Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-24-2012, 09:22 AM
RDKells RDKells is offline Word 2010 - Different Save Location for Different Templates? Windows 7 32bit Word 2010 - Different Save Location for Different Templates? Office 2010 32bit
Novice
Word 2010 - Different Save Location for Different Templates?
 
Join Date: May 2012
Posts: 6
RDKells is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 05-24-2012, 11:03 AM
Charles Kenyon Charles Kenyon is offline Word 2010 - Different Save Location for Different Templates? Windows Vista Word 2010 - Different Save Location for Different Templates? Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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
You would set the actual path in the line setting the value for strNewPath. Note that the path has to end with a backslash \

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.
Reply With Quote
  #3  
Old 05-24-2012, 11:07 PM
RDKells RDKells is offline Word 2010 - Different Save Location for Different Templates? Windows 7 32bit Word 2010 - Different Save Location for Different Templates? Office 2010 32bit
Novice
Word 2010 - Different Save Location for Different Templates?
 
Join Date: May 2012
Posts: 6
RDKells is on a distinguished road
Default

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
Reply With Quote
  #4  
Old 05-25-2012, 03:12 AM
RDKells RDKells is offline Word 2010 - Different Save Location for Different Templates? Windows 7 32bit Word 2010 - Different Save Location for Different Templates? Office 2010 32bit
Novice
Word 2010 - Different Save Location for Different Templates?
 
Join Date: May 2012
Posts: 6
RDKells is on a distinguished road
Default

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.
Reply With Quote
  #5  
Old 05-25-2012, 05:14 AM
Charles Kenyon Charles Kenyon is offline Word 2010 - Different Save Location for Different Templates? Windows Vista Word 2010 - Different Save Location for Different Templates? Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by RDKells View Post
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.
Trusted locations are set by each user. You tell Word which are the folders where you trust macros. A very good place to mark as a trusted location is the folder you designate to hold workgroup templates.

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
Reply With Quote
  #6  
Old 05-25-2012, 08:07 AM
RDKells RDKells is offline Word 2010 - Different Save Location for Different Templates? Windows 7 32bit Word 2010 - Different Save Location for Different Templates? Office 2010 32bit
Novice
Word 2010 - Different Save Location for Different Templates?
 
Join Date: May 2012
Posts: 6
RDKells is on a distinguished road
Default

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
Reply With Quote
  #7  
Old 05-25-2012, 09:43 AM
RDKells RDKells is offline Word 2010 - Different Save Location for Different Templates? Windows 7 32bit Word 2010 - Different Save Location for Different Templates? Office 2010 32bit
Novice
Word 2010 - Different Save Location for Different Templates?
 
Join Date: May 2012
Posts: 6
RDKells is on a distinguished road
Default

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
Reply With Quote
  #8  
Old 05-25-2012, 09:47 AM
RDKells RDKells is offline Word 2010 - Different Save Location for Different Templates? Windows 7 32bit Word 2010 - Different Save Location for Different Templates? Office 2010 32bit
Novice
Word 2010 - Different Save Location for Different Templates?
 
Join Date: May 2012
Posts: 6
RDKells is on a distinguished road
Default

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
From a document that is used for the similar properties of opening a few word documents. So I just copied it and edited the macro for my file locations, but it doesn't work for me .

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.
Reply With Quote
  #9  
Old 05-25-2012, 11:03 AM
Charles Kenyon Charles Kenyon is offline Word 2010 - Different Save Location for Different Templates? Windows Vista Word 2010 - Different Save Location for Different Templates? Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi location templates James m Outlook 0 05-23-2012 06:53 PM
Word 2010 - Different Save Location for Different Templates? Word 2010 save to new location youngdave55 Word 5 05-10-2012 12:12 AM
Word 2010 - Different Save Location for Different Templates? Tabs in MS Word 2010 templates ibsfsg Word 2 12-15-2011 04:54 AM
Word 2010 - Different Save Location for Different Templates? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 04:55 PM.


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