LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Add Page Numbers to PDF

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page numbers in page break view Al Excel Discussion (Misc queries) 1 August 24th 09 05:28 PM
Different Page Numbers In Worksheet w/Page Breaks UT Excel Discussion (Misc queries) 8 January 16th 09 06:48 PM
How can Enter Page Numbers and/or page ranges separated by commas. d Excel Discussion (Misc queries) 1 December 3rd 08 03:41 PM
Page numbers on copies of a single page worksheet sr accountant Excel Discussion (Misc queries) 1 May 7th 07 06:29 PM
Add page numbers to multiple worksheets without changing page setu alatona Excel Discussion (Misc queries) 2 March 16th 07 07:23 PM


All times are GMT +1. The time now is 06:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"