Making Game: How to set specific saving location and format for a specific Word document?

Original Source Link

Is there a way to set a specific saving location, and format (let’s say PDF) for a single Word document (not as default for every Word documents)?

Thanks

There is no feature in word to set a save location for individual files.

You can refer to the vba code below:

Sub test111111()
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
    "C:XXXXXXtest123.pdf", ExportFormat:=wdExportFormatPDF, _
    OpenAfterExport:=True, OptimizeFor:=wdExportOptimizeForPrint, Range:= _
    wdExportAllDocument, From:=1, To:=1, Item:=wdExportDocumentContent, _
    IncludeDocProps:=True, KeepIRM:=True, CreateBookmarks:= _
    wdExportCreateNoBookmarks, DocStructureTags:=True, BitmapMissingFonts:= _
    True, UseISO19005_1:=False
ChangeFileOpenDirectory "File save location"
End Sub

Tagged : /

Leave a Reply

Your email address will not be published. Required fields are marked *