View Single Post
  #10   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Divinite Divinite is offline
external usenet poster
 
Posts: 15
Default Mail merge to PDF

I altered the lines for the file names and now they don't have the
docx in front of them. However, the first file, which was exporting
without the docx previously, is cutting off part of the merged file
name now. Not a huge deal since it's only one file and I know it will
always be the first in the list, but something to note.

I turned off the UseISO19005_1 option (False) and adjusted the
formatting of the cover page. This seems to have kept the formatting
as I want it (no color changes or type changes, etc). I have not been
able to figure out how to get the ToC to link, but at least there are
bookmarks in the PDF!

I tried to change the OptimizeFor:=wdExportOptimizeForPrint option
since we're screen viewing these only, but I couldn't figure out what
option should be for screen optimization.

Thank you,
Jessica

On Aug 6, 12:19 am, "Graham Mayor" wrote:
The current version of the add-in available for download from my web site is
Version 31. This one (and version 28) print to the AdobePDF driver and thus
require Acrobat installed. The only changes you can make to the settings are
those in the printer driver. It does not use the Acrobat add-in with its
extra functionality.

The later versions of the Splitmerge add-in include a macro to create a
template to use for the merge when the merge document template is not
available - presumably you have the merge document template - and use the
merge document template when it is available, but the normal template if it
is not available. Using the normal template can produce formatting anomalies
if the merge document was based on some other template.

The additional version (32) linked to this thread is not fully developed and
uses the SaveAsPDFandXPS.exe add-in. This PDF add-in does not have any
Ribbon commands. It adds an option to the Save As menu.(PDF or XPS) and if
you select the PDF option, the dialog has an options button. (32) is
configured to save with 'Document structure tags for accessibilty' and ISO
19005-1 compliance checked, but it would be simple enough to change that.
You will find the relevant code:

If MakePDF = True Then
If Application.Version 12 Then
NewDoc.PrintOut Background:=False
Else
NewDoc.ExportAsFixedFormat OutputFileName:= _
FldrPath & fnames(i) & ".pdf", _
ExportFormat:=wdExportFormatPDF, _
OpenAfterExport:=False, _
OptimizeFor:=wdExportOptimizeForPrint, _
Range:=wdExportAllDocument, From:=1, To:=1, _
Item:=wdExportDocumentContent, _
IncludeDocProps:=True, _
KeepIRM:=True, _
CreateBookmarks:=wdExportCreateHeadingBookmarks, _
DocStructureTags:=True, _
BitmapMissingFonts:=True, _
UseISO19005_1:=True
End If
End If.

in the
Private Sub app_MailMergeAfterMerge(ByVal Doc As Document, ByVal DocResult
As Document)
code which you will find in the Merge Application class module.

In order to remove the docx. part of the filename, you can start by changing
the above section of code to:

If MakePDF = True Then
If Application.Version 12 Then
NewDoc.PrintOut Background:=False
Else
NewDoc.ExportAsFixedFormat OutputFileName:= _
Left(FldrPath & fnames(i), _
Len(FldrPath & fnames(i)) - 5) & ".pdf", _
ExportFormat:=wdExportFormatPDF, _
OpenAfterExport:=False, _
OptimizeFor:=wdExportOptimizeForPrint, _
Range:=wdExportAllDocument, From:=1, To:=1, _
Item:=wdExportDocumentContent, _
IncludeDocProps:=True, _
KeepIRM:=True, _
CreateBookmarks:=wdExportCreateHeadingBookmarks, _
DocStructureTags:=True, _
BitmapMissingFonts:=True, _
UseISO19005_1:=True
End If
End If

If you find the right combination of Microsoft PDF parameters to give you
the results you require, then please let me know, either by this thread or
to my web site and I will ad the changes to the live version of the add-in.