PC Review


Reply
Thread Tools Rate Thread

Add Page Numbers to PDF

 
 
Swami
Guest
Posts: n/a
 
      23rd Mar 2010
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.pdf")

pdfDoc1.Close

Set jsObj = Nothing
Set pdfDoc1 = Nothing

End Sub
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot get page numbers on my slides using insert page numbers sunshine Microsoft Powerpoint 2 21st Apr 2010 10:36 PM
page numbers in Word 2007 - skipping page number on first page John Goche Microsoft Word New Users 1 13th Nov 2009 04:04 PM
Page numbers as Written Numbers NOT numerals in header/footer cristyh Microsoft Word Document Management 2 2nd Jul 2009 10:28 PM
Over-riding Section Page Numbers with Document Page Numbers in a T =?Utf-8?B?TWFyZ2U=?= Microsoft Word Document Management 3 16th Nov 2006 11:57 AM
Page numbers show up in form {PAGE } not as numbers. Why? =?Utf-8?B?Q2lsYW50cm8=?= Microsoft Word Document Management 4 1st Apr 2006 05:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:57 AM.