If you go to fellow MVP Graham Mayor's website at:
http://www.gmayor.com/individual_merge_letters.htm
and download a copy of the add-in that I wrote to allow the execution of a
mailmerge to a separate document for each record with the filename of each
document being provided from one of the fields in the datasource, and if you
modfy the following line of code in the Private Sub
app_MailMergeAfterMerge(ByVal Doc As Document, ByVal DocResult As Document)
routing in the MergeApplication Class Module
from:
NewDoc.SaveAs FldrPath & fnames(i)
NewDoc.Close
to:
NewDoc.SaveAs FldrPath & fnames(i)
NewDoc.PrintOut Background: = False
NewDoc.Close wdDoNotSaveChanges
Then, before executing the merge to a new document, you select Print from
the File menu and select "Adobe PDF" as the printer and then you click on
the Properties tab and uncheck the "View Adobe PDF results" and "Prompt for
Adobe PDF filename" items and then close that dialog.
Now, execute your mailmerge to a new document and click on "Yes" when you
are asked if you want to create separate files for each document, and then
select the field in the datasource that will supply the filenames, then when
you click on Continue, as well as having the files saved in the directory
that you had nominated, a .pdf will be created in the MyDocuments folder
with the name of the .pdf being supplied from the datasource.
I have just made this modification to the add-in myself and it worked fine.
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
Post by NuraqI am using Word 2003 and Acrobat 6. I want to automate a procedure that
runs a mail merge and prints each record to a PDF file using VB.
My problem is that I want to supply the file name to the Acrobat printer
so that it soes not prompt me for it. Is there a way to do this in VB?