![]() |
#5
|
|||
|
|||
![]()
Hi
Thanks for your help. I should have pointed out that my document wasn't saved as a template, however, I did do this and when it is opens up, it opens as a fresh document, called, Document1 but keeps asking if I wanted to save changes to the template and it stops my user form from opening up automatically. So, as a plain word document, I managed to record a save as macro to specific folder and then used and adapted your code, which allows me rename the file in the save dialog box before hittting save. Do you think this is the best solutions or is a way to do the whole process in one with the document being renamed from grabbing txt from the form or something similar- code below- Sub SaveAsContract() ' ' SaveAsContract Macro ' ' ChangeFileOpenDirectory _ "H:\HR\Reward & Shared Services\Shared Services Only\1 ~ Starters\5 ~ Offers Sent\" ActiveDocument.SaveAs2 FileName:= _ "H:\HR\Reward & Shared Services\Shared Services Only\1 ~ Starters\5 ~ Offers Sent\A-D contract v10-MACRO.docm" _ , FileFormat:=wdFormatXMLDocumentMacroEnabled, LockComments:=False, _ Password:="", AddToRecentFiles:=True, WritePassword:="", _ ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _ SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _ False, CompatibilityMode:=14 Dim strName As String, dlgSave As Dialog Set dlgSave = Dialogs(wdDialogFileSaveAs) strName = "LastName,FirstName Contract " ActiveDocument.BuiltInDocumentProperties("Title"). Value = strName With dlgSave .Name = strName .Show End With End Sub Cheers Ross |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I save a Word file with a macro for distribution? | leemoreau | Word VBA | 3 | 10-04-2013 08:06 AM |
![]() |
VBNation | Word VBA | 2 | 02-08-2013 07:14 AM |
![]() |
tinfanide | Word VBA | 6 | 12-06-2011 03:02 PM |
![]() |
jabberwocky12 | Word VBA | 2 | 10-22-2010 12:23 PM |
Macro will not save to normal.dot file when exiting | bobbraun | Word | 1 | 09-28-2010 06:26 AM |