View Single Post
 
Old 06-25-2021, 11:58 AM
jotentin jotentin is offline Windows 10 Office 2007
Novice
 
Join Date: Jun 2021
Posts: 2
jotentin is on a distinguished road
Default Macro in Word 2007 to make changes and save with another extension

Hello.

I have many .doc files and I need to make some changes and save them as .docx.

Always the changes to be made are the same and the name when it is saved must be the one of the active document but with the new extension (docx).

In order to do it, I have created a macro with the macro recorder but although the changes are made correctly, the file is always saved with the name of the file used when I saved the macro (Document1).

The generated code is as follows:

.......... (rest of the code)

ActiveDocument.SaveAs FileName: = _
"Document1.docx", FileFormat: = _
wdFormatDocumentDefault, LockComments: = False, Password: = "", AddToRecentFiles _
: = True, WritePassword: = "", ReadOnlyRecommended: = False, EmbedTrueTypeFonts _
: = False, SaveNativePictureFormat: = False, SaveFormsData: = False, _
SaveAsAOCELetter: = False

Could you please tell me the changes that I must make in the above code in order to save it correctly?

Thanks.
Reply With Quote