Home |
Search |
Today's Posts |
#1
|
|||
|
|||
File location by template?
I was hoping to be able to save files in a particular location according to
which template I use. For example, if I use the letter template, the document would default to a letters folder. If I use a lecture template, the document would default to a lectures folder. I was hoping to be abl eto save these preferences by template, but it seems to make the change globally. Am I out of luck? |
#2
|
|||
|
|||
On Wed, 3 Aug 2005 09:50:07 -0700, "Michelle"
wrote: I was hoping to be able to save files in a particular location according to which template I use. For example, if I use the letter template, the document would default to a letters folder. If I use a lecture template, the document would default to a lectures folder. I was hoping to be abl eto save these preferences by template, but it seems to make the change globally. Am I out of luck? In each template, place two macros (using the instructions at http://www.gmayor.com/installing_macro.htm) that look like this, except that each template contains a different path: Public Sub FileSaveAs() With Dialogs(wdDialogFileSaveAs) .Name = "c:\documents\letters\" .Show End With End Sub Public Sub FileSave() If ActiveDocument.Path = "" Then With Dialogs(wdDialogFileSaveAs) .Name = "c:\documents\letters\" .Show End With Else ActiveDocument.Save End If End Sub It's important to end the path with a backslash. These macros will run when you use the File Save As menu item and the File Save menu item, respectively. There's more about this at http://www.word.mvps.org/FAQs/Macros...SaveAsPath.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#3
|
|||
|
|||
Thank you. I haven't done much with macros, but it looks like this should
help. "Jay Freedman" wrote: On Wed, 3 Aug 2005 09:50:07 -0700, "Michelle" wrote: I was hoping to be able to save files in a particular location according to which template I use. For example, if I use the letter template, the document would default to a letters folder. If I use a lecture template, the document would default to a lectures folder. I was hoping to be abl eto save these preferences by template, but it seems to make the change globally. Am I out of luck? In each template, place two macros (using the instructions at http://www.gmayor.com/installing_macro.htm) that look like this, except that each template contains a different path: Public Sub FileSaveAs() With Dialogs(wdDialogFileSaveAs) .Name = "c:\documents\letters\" .Show End With End Sub Public Sub FileSave() If ActiveDocument.Path = "" Then With Dialogs(wdDialogFileSaveAs) .Name = "c:\documents\letters\" .Show End With Else ActiveDocument.Save End If End Sub It's important to end the path with a backslash. These macros will run when you use the File Save As menu item and the File Save menu item, respectively. There's more about this at http://www.word.mvps.org/FAQs/Macros...SaveAsPath.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
File location by template?
When I used those macros to save in specified files, I get an error message
of Compile Error: Ambiguous name detected FileSaveAs and I have no idea what's the problem. "Jay Freedman" wrote: On Wed, 3 Aug 2005 09:50:07 -0700, "Michelle" wrote: I was hoping to be able to save files in a particular location according to which template I use. For example, if I use the letter template, the document would default to a letters folder. If I use a lecture template, the document would default to a lectures folder. I was hoping to be abl eto save these preferences by template, but it seems to make the change globally. Am I out of luck? In each template, place two macros (using the instructions at http://www.gmayor.com/installing_macro.htm) that look like this, except that each template contains a different path: Public Sub FileSaveAs() With Dialogs(wdDialogFileSaveAs) .Name = "c:\documents\letters\" .Show End With End Sub Public Sub FileSave() If ActiveDocument.Path = "" Then With Dialogs(wdDialogFileSaveAs) .Name = "c:\documents\letters\" .Show End With Else ActiveDocument.Save End If End Sub It's important to end the path with a backslash. These macros will run when you use the File Save As menu item and the File Save menu item, respectively. There's more about this at http://www.word.mvps.org/FAQs/Macros...SaveAsPath.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
OPENING Template doesn't work like FILE | NEW does? | Microsoft Word Help | |||
How to creat relative and shorthand file path names? | Microsoft Word Help | |||
Can I use a graphic file or a pdf file as a template in Word? | Page Layout | |||
Why doesn't my custom template attach to my .htm file? | Microsoft Word Help | |||
File created from template blown in size | Microsoft Word Help |