Professional Documents
Culture Documents
4
4
Dim masterDoc As Document, singleDoc As Document, lastRecordNum As Long ' Create variables
("Post-it Notes") for later use
masterDoc.MailMerge.DataSource.FirstRecord =
masterDoc.MailMerge.DataSource.ActiveRecord ' Limit the selection to just one document by
setting the start ...
masterDoc.MailMerge.DataSource.LastRecord =
masterDoc.MailMerge.DataSource.ActiveRecord ' ... and end points to the active record
singleDoc.SaveAs2 _
FileName:=masterDoc.MailMerge.DataSource.DataFields("DocFolderPath").Value &
Application.PathSeparator & _
singleDoc.ExportAsFixedFormat _
OutputFileName:=masterDoc.MailMerge.DataSource.DataFields("PdfFolderPath").Value &
Application.PathSeparator & _
Else
End If