Reply
 
Thread Tools Display Modes
  #1   Report Post  
Michelle
 
Posts: n/a
Default 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   Report Post  
Jay Freedman
 
Posts: n/a
Default

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   Report Post  
Michelle
 
Posts: n/a
Default

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   Report Post  
Posted to microsoft.public.word.docmanagement
AMG
 
Posts: n/a
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OPENING Template doesn't work like FILE | NEW does? Charles Rodriguez Microsoft Word Help 2 June 20th 05 06:13 PM
How to creat relative and shorthand file path names? 2dogs Microsoft Word Help 1 May 15th 05 12:11 PM
Can I use a graphic file or a pdf file as a template in Word? Kelly Page Layout 1 February 7th 05 11:11 AM
Why doesn't my custom template attach to my .htm file? KCS Microsoft Word Help 1 November 30th 04 03:58 AM
File created from template blown in size Charles Microsoft Word Help 2 November 29th 04 02:47 PM


All times are GMT +1. The time now is 01:00 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"