With VBA in excel, how can I copy a pdf document (page by page into different worksheets)
I want both a page image and the text from that page on each worksheet but am struggling with the acrobat object model....
Hello Test Screen Name,
I am making no headway and am hoping that you can offer some help? This is my my code but I am copying the entire file each time. I would prefer to use the copyclipboard but cannot make that work either. I have read the sdk a lot but need an answer for this job before it is too late. If you could tell me copy ONE page at a time that would be great? Also how do I copy the page image as opposed to the text?
Private Sub Sample_Pages()
'IAC objects
Dim PDFApp As CAcroApp
Dim pdfDoc As CAcroPDDoc
Dim pdfAVdoc As AcroAVDoc
Dim pdfPageView As AcroAVPageView
Dim pdfPage As AcroPDPage
Dim PDFPath As String
Dim numPages As Integer
'temporary hard coding of file name
PDFPath = "C:\PDF\Sample.pdf"
'Initialize Acrobat by creating App object
Set PDFApp = CreateObject("AcroExch.App")
Set pdfAVdoc = CreateObject("Acroexch.AVDoc")
Set pdfDoc = CreateObject("AcroExch.PDDoc")
' open the av and pd doc
If pdfAVdoc.Open(PDFPath, "") Then
Set pdfDoc = pdfAVdoc.GetPDDoc
numPages = pdfDoc.GetNumPages
Set pdfPageView = pdfAVdoc.GetAVPageView
For i = 1 To numPages
Set pdfPage = pdfDoc.AcquirePage(i)
SendKeys "{CLEAR}" ' i would like to avoid the use of sendkeys but cannot work out copytoclipboard method
SendKeys ("a"), True
SendKeys ("^c"), True
Windows("Book1.xls").Activate
Sheets.Add
ActiveSheet.Range("H1").Select
ActiveSheet.Paste
Next i
Else
MsgBox PDFPath & " - File not found"
Exit Sub
End If
pdfAVdoc.Close (True)
pdfDoc.Close
PDFApp.Exit
End Sub
Message was edited by: NoNameFree
Similar Messages
-
How can I copy and paste table cells from Pages into InDesign with minimum reformating?
How can I copy and paste table cells from Pages into InDesign with minimum reformating?
Do you mean you want to retain the formatting from Pages, or retain formatting already applied in ID?
-
How can i copy a pdf to a ppt?
how can i copy a pdf to a ppt?
Hi carlafeldman,
Welcome!
Here is a link to a really handy 'Getting started with ExportPDF' guide.
Let me know if this helps!
Kind regards, Stacy -
How can I copy my Word documents and my films which I already have in my computer into my itouch?
Yes.
Everything in iCal on the Mac is archived with the Export.
This is another method for backing up your iCal data. The Address Book includes the same option. -
How do I copy a pdf document into Icloud Beta
how do I copy a pdf document into Icloud Beta - I am new to this!
Just place your disc in and take the PDF file, drop it on the CD image. then right click and select burn disc. And there you go. It willl be saved on your disk and they should be able to open it with no problem.
-
How can i convert a pdf document fully without problems
how can i convert a pdf document fully to word without receiving a error or changing all the structure of the page
Need a solution for my online work. I need to upload documents in word and no pdf.
Sites where i want to use it
[personal information removed to foil spam bots... JTS]
[This is an open forum, not Adobe support, please do not post personal information]
Thanks for your helpReader cannot convert files to Word. There is an ExportPDF service with its own forum to help with issues to the service. However, converting files to Word is by its very nature an iffy proposition. How well it works depends upon the content of the file and how it was created.
-
How can I convert a pdf document fully
how can i convert a pdf document fully
What do you want to convert a pdf to? There is the Adobe ExportPDF service and of course Acrobat can convert files as well as long as you want to convert to Word or perhaps Excel. The quality of the conversion depends upon its content and how it was created. If you want to convert it do a different format then you have to give us more info.
-
How can I download a .pdf document from a web link without Adobe Reader starting automatically and preempting the download?
That depends on your operating system and browser. On Windows, e.g. using Firefox, you right-click on the link, then select 'Save link as...'.
-
How can I rotate a PDF document when viewing in adobe reader?
How can I rotate a PDF document when iewing in adobe reader?
That hardware button can actually be toggled to work either as a mute button, or a lock orientation button. This can be edited at the settings screen.
-
How can I print a PDF document?
How can I print a PDF document?
That states that the PDF touch app doesnt support printing which is a technically true as it doesnt have a button/option to print from the app but doing a crtl-p (this is on a full PC version of win8 not RT) brings up the print dialogue and its prints fine.
-
How can i translate a pdf document in japanese language to english language
how can i translate a pdf document in japanese language to english language
Hi trueman9299,
ExportPDF uses OCR (optical character recognition) to convert image (scanned text) to editable/selectable text, but it doesn't translate from one language to another.
Best,
Sara -
How can I convert a PDF file in my computer into a word document?
How Can I convert a PDF file in my computer into a Word Document?
You might try posting to the Adobe ExportPDF forum:
http://forums.adobe.com/community/exportpdf
If you would like to email me ([email protected]) the PDF, I'll see if there's anything I can do to help.
Regards,
Brian -
Can you edit a pdf document without exporting it into a word document?
Can you edit a pdf document without exporting it into a word document?
Hi sylvias99766822,
You can if you have Acrobat. If you don't, feel free to give it a try. You can download a 30-day trial from http://www.adobe.com/products/acrobat.html.
Keep in mind, though, that Acrobat isn't intended to be a word processor. So, while you can make adjustments to text and graphics, if you need to do a major overhaul of the text in the document, it's best to go back to the source document and edit the content there.
Best,
Sara -
HT3345 How can i open a pdf document in Numbers?
How can i open a pdf dokument in Numbers, or Pages?
Ususally I open a pdf document in Preview (or Skim or Acrobat Reader), then drag the page(s) I want from the Thumbnails on the side on to the Numbers sheet., You can also choose a single page pdf from the menu item "Insert > Choose..."
-
How can I copy an image/picture from the internet into a word document
I am trying to copy and paste an image or picture from the internet and insert it into a word document. I select and copy the image from the internet page. I then go to the word document and select past special. When I select 'paste special' it only allows text to be copied and no images or pictures. If I also try to drag the image and place it in the word document. It does not allow me to do so. Any suggestions to fix this issue?
Considering this is a MS Word issue I'd recommend reposting to that forum. You can find one at:
http://www.officeformac.com/productforums/
Regards,
Roger
Maybe you are looking for
-
I got new Apple TV 10 days back,its not asking for the WIFI password.Home sharing is not working,i am getting Error while streaming videos from Youtube. I can only see pics and video saved in my iphone. No other options are working.The worst part is
-
Hi All, I am trying to search for portal iviews, pages & roles using TREX. I created the index & assigned the PCD folder (I have done all the pre-requisites for PCD search).... Then when i opened the Index Administration page, the status for the inde
-
How can I force pages to update images to reflect changes made in external editor?
I have added a number of (psd if that's relevant) images to a Pages '09 document (drag & drop from Finder) which have since been updated in an external editor. Pages is not reflecting these changes dynamically, even on closing and re-opening the doc
-
Help Needed: FERC (Federal Energy Regulatory Commission) in Utilities
Hi guys Can anyone help me in finding suffice material for a good reading and understanding on FERC (which stands for Federal Energy Regulatory Commission)??? What I know is, this comes under Utility Industries. Also, is there anyone worked in any Ut
-
Urgent - Unable to deploy applications to oc4j
Hi I am not able to do any thing on the server, I cannot create new oc4j instance, remove application or deploy a new ear file. Earlier I tried increase the memory by using OC4J instance -. Administration - >Server Properties -> Java options added th