View Single Post
 
Old 12-13-2016, 10:15 AM
dwirony dwirony is offline Windows 7 64bit Office 2003
Advanced Beginner
 
Join Date: Oct 2016
Posts: 49
dwirony will become famous soon enough
Default Changing file directory from a temp folder

Hello all,

I am having trouble getting my macro to save my document into the desired location. The program I use attempts to save documents to a default temporary folder, and even after recording the process it still won't save my document to my desired location. Am I doing something wrong? How can I get my macro to override the default location for documents?

Code:
Sub Savetolocation
'
'
ChangeFileOpenDirectory "C:\Users\dwirony\My Documents\Overflow Folder\"
    ActiveDocument.SaveAs2 FileName:=ActiveDocument.Fullname, FileFormat:= _
        wdFormatXMLDocument, LockComments:=False, Password:="", AddToRecentFiles _
        :=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts _
        :=False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
        SaveAsAOCELetter:=False, CompatibilityMode:=14
End Sub
Reply With Quote