![]() |
#2
|
||||
|
||||
![]()
Try something along the lines of:
Code:
Dim DocCount As Long, MaxDocs As Integer, DocName As String With ActiveDocument .Repaginate MaxDocs = .Sections.Count For DocCount = 1 To MaxDocs With .Sections(DocCount).Footers(wdHeaderFooterPrimary).Range DocName = Trim(Left(Replace(.Text, vbCr, " "), Len(Replace(.Text, vbCr, " ")) - 47)) & ".pdf" End With .ExportAsFixedFormat OutputFileName:=.Path & "\" & DocName, ExportFormat:=wdExportFormatPDF, _ OpenAfterExport:=False, Range:=wdExportFromTo, From:=DocCount * 2 - 1, To:=DocCount * 2, _ OptimizeFor:=wdExportOptimizeForPrint, Item:=wdExportDocumentContent, IncludeDocProps:=True, _ CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, BitmapMissingFonts:=True, _ KeepIRM:=True, UseISO19005_1:=False Next DocCount End With PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
exporting images with correct file names | lister | PowerPoint | 1 | 03-12-2014 12:27 AM |
Exporting/printing MS Project File containing Gantt Chart to an Image | ms_user | Project | 7 | 04-02-2013 02:50 AM |
![]() |
sharke | Outlook | 2 | 09-06-2010 07:40 PM |
Exporting to PDF and keeping file size down | CloudandBanner | Word | 0 | 08-24-2009 09:29 AM |
Outlook 2003 drops notes when exporting as a VCARD file | GY58 | Outlook | 0 | 04-29-2006 07:57 PM |