#1
|
|||
|
|||
Word 2010 - Different Save Location for Different Templates?
Hello,
I have searched far and wide for an answer to this question but can't seem to find one. Every day I create about 10 word documents from different templates I then have to save these 10 documents into 10 different folders in various network drives. I want to set it so that rather than having to navigate around my network, each template, when it creates the file, and I click save-as I am already in the directory I need to be in for that specific document, unfortunately I only seem to be able to set the default save location for ALL word documents, not individual. Is it possible to set default save locations for different document templates? I have tried; - File->Save->Save Location - File->Options->Advanced->File Location But these seem to just set it for one document. I am pulling my hair out!! Thanks in advance, Ryan |
#2
|
|||
|
|||
Yes, it is possible, but not easy. I would do this by putting an AutoNew in your macro-enabled template that changes the File Open directory (which is the default File Save directory).
The following macro will change the file save path and force an immediate save when a new document is created based on the template that contains the macro. Code:
Sub AutoNew() ' Dim strNewPath As String strNewPath = "C:\desired location\" ' Set save location ChangeFileOpenDirectory strNewPath ActiveDocument.Save End Sub Users will need to have macros trusted in the template location. Note that this will temporarily set the place for File>Open if they try opening another document, just as it would if they were to manually save the file in that directory. |
#3
|
|||
|
|||
Hi Charles, sorry to be a noob, but how exactly do I add that macro to a template? Can't seem to find the macro option .
Thanks, Ryan |
#4
|
|||
|
|||
Ok I've figured out how to save the macro into the document and how to save the template as a macro enabled template. Though it asks if I wish to enable content for macros, can I set it so that it's a trusted document and macro's in it are always avaliable?
It seems I have to manually run it, isit possible to have it so that whenI click the 'save' icon that it will run the macro and the correct directory will be displayed for saving into. Or maybe as an alternate, when I press CRTL+S? Thanks, Ryan. |
#5
|
|||
|
|||
Quote:
You should not have to run it manually. Because it is named AutoNew should run automatically when the new document is created based on the template. You can set it up to intercept the Save Command or the Ctrl-S shortcut. You would do the latter by customizing your keyboard shortcut (and storing that shortcut in your template). If you name your macro FileSave that should intercept the save command. But, see http://word.mvps.org/FAQs/MacrosVBA/...tSavePrint.htm |
#6
|
|||
|
|||
Woops, that's my problem I changed autonew to name the macro... Thought it was a naming process lol. Will have a go when I get a spare moment and spread some love if it works
Ryan |
#7
|
|||
|
|||
Hi, I needed to edit the document before editing, so using some common sense and info in here I ended up using this:
Code:
Sub FileSave() ' Dim strNewPath As String strNewPath = "" ' Set save location ChangeFileOpenDirectory strNewPath ActiveDocument.Save End Sub Which is EXACTLY what I wanted, thanks alot Charles. Just now trying to make a macro to open the 10 documents on the click of a 'command button' in another document. Any ideas macrowise/creating a command button? Thanks, Ryan |
#8
|
|||
|
|||
I copied this:
Code:
Private Sub CommandButton1_Click() Documents.Add Template:= _ " Private Sub CommandButton1_Click() Documents.Add Template:= _ " Private Sub CommandButton1_Click() Documents.Add Template:= _ "C:\MY FILE", _ NewTemplate:=False, DocumentType:=0 End Sub Private Sub Document_New() End Sub All I want it to do is; when I click the button, it then opens the 10 templates (as new word documents). Please could you help? How do I create command buttons? Thanks, Ryan. |
#9
|
|||
|
|||
I don't use Command Buttons. I do use MacroButton Fields.
If you want more help with this aspect, though, you should post a separate thread so that people who do use command buttons can respond to you. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multi location templates | James m | Outlook | 0 | 05-23-2012 06:53 PM |
Word 2010 save to new location | youngdave55 | Word | 5 | 05-10-2012 12:12 AM |
Tabs in MS Word 2010 templates | ibsfsg | Word | 2 | 12-15-2011 04:54 AM |
Creating templates for dummies in Word 2010 | oceanclub | Word | 1 | 07-14-2011 08:39 PM |
Promt for save location when sendimg mail | blegs38552 | Outlook | 0 | 01-31-2010 07:29 AM |