View Single Post
 
Old 05-01-2019, 03:15 PM
DM2 DM2 is offline Windows 7 64bit Office 2010
Novice
 
Join Date: Apr 2019
Posts: 5
DM2 is on a distinguished road
Default

Quote:
added a line of VBA code to the example
Paul,
I think you're talking about the below code, which I think is new under the heading "
Send Mailmerge Output to Individual Files"?
Code:
      With ActiveDocument
        'Add the name to the footer
        '.Sections(1).Footers(wdHeaderFooterPrimary).Range.InsertBefore StrName
        .SaveAs FileName:=StrFolder & StrName & ".docx", FileFormat:=wdFormatXMLDocument, AddToRecentFiles:=False
        ' and/or:
        .SaveAs FileName:=StrFolder & StrName & ".pdf", FileFormat:=wdFormatPDF, AddToRecentFiles:=False
        .Close SaveChanges:=False
      End With
Reply With Quote