![]() |
#1
|
|||
|
|||
![]()
Hallo to everybody,
browsing the forum I found a sample with the following code and I am trying to modify to get as output a single Pdf file of "iEnd" pages. But without success. Can you please help? Thanks and Regards JohnBi Sub CertificatePrint() Dim iStart As Integer, iEnd As Integer, i As Integer On Error GoTo ErrHandler With ActiveDocument.Shapes(1).TextFrame.TextRange.Field s(1) iStart = CInt(InputBox("What is the first Certificate to print?", _ "Print Certificates From", Split(Split(.Code.Text, " ")(0), "=")(1))) iEnd = CInt(InputBox("What is the last Certificate to print?", _ "Print Certificates To", iStart)) If iStart = 0 Or iStart > iEnd Then Exit Sub For i = iStart To iEnd If i = iStart Then With Application.Dialogs(wdDialogFilePrint) If .Show = 0 Then Exit Sub End With End If .Code.Text = "=" & i & " \# 000" .Update 'ActiveDocument.PrintOut ' Next '---------- export pdf ActiveDocument.ExportAsFixedFormat OutputFileName:= _ ActiveDocument.Path & "\" & ActiveDocument.Name & ".pdf", ExportFormat:= _ wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _ wdExportOptimizeForPrint, Range:=wdExportAllDocument, _ Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _ CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _ BitmapMissingFonts:=True, UseISO19005_1:=False On Error GoTo ErrHandler Next End With ErrHandler: End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Resource Pool / export | Bec82 | Project | 3 | 08-16-2011 11:11 AM |
Import and Export | Nwit | Outlook | 0 | 11-06-2010 09:57 AM |
![]() |
winseelan | Outlook | 2 | 10-27-2010 01:35 AM |
Export to Word | dr223 | Word | 1 | 10-19-2010 07:24 AM |
Export/Import | Arkmom | Outlook | 0 | 03-31-2009 02:47 PM |