F
Freckles
I need to call a template from a macro then save it as a Word Document with a
name that changes based on the date.
--------------------------------------------------------------
This part works --
Sub Get_Template()
'
' Get_Template Macro
' Macro recorded 10/20/2008 by Deb Koplen
'
ChangeFileOpenDirectory "E:\ABS SPA\"
Documents.Open FileName:="""####_DSR Government Education
Segment.dot""", _
ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _
PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _
wdOpenFormatAuto, XMLTransform:=""
Now I want to save it as a Word document in a different directory with the
current MMDD as part of the name of the document. This part of my macro does
not work:
ChangeFileOpenDirectory _
"W:\GOVERNMENT & EDUCATION\Daily Sales Reporting SPA\ATTACHMENTS\"
ActiveDocument.SaveAs FileName:= _
"Format(Now(), mmdd)" & "_DSR Government Education Segment.doc",
FileFormat:=wdFormatDocument _
, LockComments:=False, Password:="", AddToRecentFiles:=True, _
WritePassword:="", ReadOnlyRecommended:=False,
EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False,
SaveAsAOCELetter:= _
False
name that changes based on the date.
--------------------------------------------------------------
This part works --
Sub Get_Template()
'
' Get_Template Macro
' Macro recorded 10/20/2008 by Deb Koplen
'
ChangeFileOpenDirectory "E:\ABS SPA\"
Documents.Open FileName:="""####_DSR Government Education
Segment.dot""", _
ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _
PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _
wdOpenFormatAuto, XMLTransform:=""
Now I want to save it as a Word document in a different directory with the
current MMDD as part of the name of the document. This part of my macro does
not work:
ChangeFileOpenDirectory _
"W:\GOVERNMENT & EDUCATION\Daily Sales Reporting SPA\ATTACHMENTS\"
ActiveDocument.SaveAs FileName:= _
"Format(Now(), mmdd)" & "_DSR Government Education Segment.doc",
FileFormat:=wdFormatDocument _
, LockComments:=False, Password:="", AddToRecentFiles:=True, _
WritePassword:="", ReadOnlyRecommended:=False,
EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False,
SaveAsAOCELetter:= _
False