Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am looking to progammatically add page numbers to a PDF using VBA. I create
a multi-page PDF using various Excel reports. The PDF then needs to be numbered sequentially. I have been able to research and find code to add a watermark to the PDF, but, no luck on page numbering. I am using Excel 2007 and Acrobat 9. Code Example: Sub WatermarkPDF() Dim bolResult As Boolean Dim pdfDoc1 As AcroPDDoc Dim jsObj As Object Set pdfDoc1 = CreateObject("AcroExch.PDDoc") If pdfDoc1.Open("C:\Test\Ranges\Reports\Custom_Merged .pdf") Then Set jsObj = pdfDoc1.GetJSObject jsObj.addWatermarkFromText ("Confidential") End If savepgnumfile = pdfDoc1.Save(1, "C:\Test\Ranges\Reports\Custom_Merged_Watermark.pd f") pdfDoc1.Close Set jsObj = Nothing Set pdfDoc1 = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Page numbers in page break view | Excel Discussion (Misc queries) | |||
Different Page Numbers In Worksheet w/Page Breaks | Excel Discussion (Misc queries) | |||
How can Enter Page Numbers and/or page ranges separated by commas. | Excel Discussion (Misc queries) | |||
Page numbers on copies of a single page worksheet | Excel Discussion (Misc queries) | |||
Add page numbers to multiple worksheets without changing page setu | Excel Discussion (Misc queries) |