See the "Individual Merge Letters" item on fellow MVP Graham Mayor's website
at:
http://www.gmayor.com/individual_merge_letters.htm
If you are using Word XP or later, the work has all been done for you in the
"Add-in to Merge Letters to Separate Files" that I have written and that can
be downloaded from that site will allow you to create each letter as a
separate file with a filename taken from a field in the data source with a
minimum of fuss, plus create the output as .pdf files.

Signature
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
> Hello
>
[quoted text clipped - 23 lines]
>
> Stu
Stu - 19 Feb 2007 05:19 GMT
Doug, it looks just the berries!
I'll run a couple of tests and post an outcome.
Thanks a million.
Stu
> See the "Individual Merge Letters" item on fellow MVP Graham Mayor's website
> at:
[quoted text clipped - 34 lines]
> >
> > Stu
Stu - 19 Feb 2007 07:02 GMT
Hello again Doug
Two problems:
1. It doesn't work with Jaws PDF Creator, even if I replace "Adobe PDF"
with "Jaws PDF Creator" (which is the name Word seems to recognise when I
record a macro to change the printer to that) in the code under Private Sub
app_MailMergeAfterMerge. Is there any way to allow it to work with Jaws, or
is it "Adobe-particular"?
2. When I run it without selecting the Create PDFs option, it creates the
individual documents, but comes up with Run-time error '91' - Object variable
or With block variable not set. Going to debug has it pointing at the one
line of code in Sub DeleteResultsDocument(). I'm left with an empty
"FormLetters" document on screen.
Stu
> See the "Individual Merge Letters" item on fellow MVP Graham Mayor's website
> at:
[quoted text clipped - 34 lines]
> >
> > Stu
Graham Mayor - 19 Feb 2007 07:32 GMT
The problem with clone PDF creators is attributable to the way that they
create PDF filenames. eg If you have Snagit 8 then its driver can create
PDFs, but it will not automatically name them from the source. In the case
of the SnagIt driver, if you substitute that for the Adobe PDF driver then
the chances are that it will create the same error message.
With SnagIt 8, you can set it to automatically name the PDF files. If you do
this the add-in will create named doc files in the target location and
automatically named PDF files which do not carry the same name sequence as
the merged documents. I suspect that Jaws PDF creator works in a similar
way. The Adobe driver is rather more configurable,.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Hello again Doug
>
[quoted text clipped - 63 lines]
>>>
>>> Stu
Graham Mayor - 19 Feb 2007 07:40 GMT
Forgot to mention that if the field you use to name the documents contains
illegal filename characters, you will also get an error.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> The problem with clone PDF creators is attributable to the way that
> they create PDF filenames. eg If you have Snagit 8 then its driver
[quoted text clipped - 76 lines]
>>>>
>>>> Stu
Stu - 19 Feb 2007 08:37 GMT
Hello Graham
Mmm.. familiar with the issue - Jaws does give you configurable options -
"Always/Never request Destination" and to include a default folder. That's
if "save to PDF" is selected - and it's always the filename of the current
document (if it already exists, it appends a serial number.) If the Jaws PDF
Creator is selected as the printer, it always requests a file name in the
dialog box.
In this instance, the file name I want to/have to assign will always be a
customerID - always an integer number cast as a string - followed by a date
code, as 12345_20070219. That code is created within our database and is a
field in the merge source document.
Will do some more playing - and maybe have to go and buy Adobe8!
Thanks
Stu
> Forgot to mention that if the field you use to name the documents contains
> illegal filename characters, you will also get an error.
[quoted text clipped - 79 lines]
> >>>>
> >>>> Stu
Graham Mayor - 19 Feb 2007 09:37 GMT
If you can 'print' to the Jaws driver, and you can setup the driver to
automatically assign the filename from the document then as the add-in saves
each document then 'prints' it to the PDF driver, you might be able to coax
it to work. The only non-Acrobat driver I have used it with has been SnagIt
which works with the provisos already made. Doug wrote the code (I only did
some testing and provide the web host for the file) so he may know of other
drivers that have been tested with it. I seem to recall that at least one
other clone has been used. I hear that the freebie PrimoPDF may not work
(though I am currently downloading it to test).

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Hello Graham
>
[quoted text clipped - 108 lines]
>>>>>>
>>>>>> Stu
Graham Mayor - 19 Feb 2007 10:18 GMT
Actually PrimoPDF works fine with two provisos. You get a prompt for each
record. In answer to the first prompt you change the destination path (but
not the file name). Then OK each record thereafter. A pain if it's a big
data file :(

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> If you can 'print' to the Jaws driver, and you can setup the driver to
> automatically assign the filename from the document then as the
[quoted text clipped - 119 lines]
>>>>>>>
>>>>>>> Stu
>I'm trying to write a macro in Word 2003 that will print individual PDF
>files for each record in a mail merge, with the file name being sourced from
[quoted text clipped - 12 lines]
>and types it in there), and I don't know enough about the Jaws DDE stuff to
>use the DDE commands.
PDFCreator comes with a COM interface, offering much the same
flexibility and programmability as Adobe Acrobat does - no dialogue
boxes and no SendKeys necessary.

Signature
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"