Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-17-2012, 01:06 AM
macropod's Avatar
macropod macropod is offline Add a "SAVE" Button to a form template? Windows 7 64bit Add a "SAVE" Button to a form template? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Dave,

You could add code like the following to each template's 'ThisDocument' module. As coded, it prompts the user to save the file immediately it's created and defaults to whatever path is specified for the StrTmpPath variable and with whatever filename's specified for the StrName variable (which i've coded for the user's name and the system date in ISO format.
Code:
Private Sub Document_New()
Dim StrName As String, StrDefPath As String, StrTmpPath As String
StrName = Environ("UserName") & Format(Now, "YYYYMMDD")
StrTmpPath = "Filepath for documents based on this template"
StrDefPath = Options.DefaultFilePath(wdDocumentsPath)
Options.DefaultFilePath(wdDocumentsPath) = StrTmpPath
With Application.Dialogs(wdDialogFileSaveAs)
  .Name = StrName
  .Show
End With
Options.DefaultFilePath(wdDocumentsPath) = StrDefPath
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable "do you also want to save changes to the document template?" harassalog. wornways Word 30 06-04-2016 02:32 PM
Add a "SAVE" Button to a form template? Launch macro sub after hitting "create pdf" button in word webharvest Word VBA 1 06-29-2011 04:56 PM
"Back" Button - to behave like web browser (Not using last slide viewed). emmiewoo PowerPoint 0 03-29-2011 06:54 AM
Add a "SAVE" Button to a form template? Template "form field" & pictures - need help MAS Word 3 02-25-2011 12:00 AM
"Send and Receive all Folders" button missing (but only with one account) incognitus Outlook 0 10-12-2010 10:42 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:36 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft