View Single Post
 
Old 01-25-2018, 02:26 PM
constructionjasont constructionjasont is offline Windows 10 Office 2016
Novice
 
Join Date: Jun 2017
Posts: 13
constructionjasont is on a distinguished road
Default Using Merge Data to Customize a File Name

I recorded a Word doc macro to update a Mail Merge based on an excel sheet array and then save as a PDF. It works almost exactly how I want, but I'm trying to customize the saved file's name. I know it's somewhere in the bold line below (with my attempt at it), can anyone tell me what I'm doing wrong?

ActiveDocument.ExportAsFixedFormat OutputFileName:= _
"C:\Users\j***\Desktop\" & Range("City") & ", " & Range("State") & " - GC Bid Instructions.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
Reply With Quote