Copy link to clipboard
Copied
I need this to do some automation for Excel to PDF. What product is this file in or where can I get it?
The correct function is "CreateObject" - you have it misspelled.
Copy link to clipboard
Copied
This is part of Acrobat Pro and Acrobat Standard. It is not redistributable.
Copy link to clipboard
Copied
Do know what the name of the reference library is? When I'm in Excel's Visual Basic Editor and scrolling through the reference library I have checked every box that says Adobe, Acro, or PDF and it still doesn't work. and I don't know why. Below is the code.
Sub ReadAdobeFields()
ROWnum = 1
Dim AcrobatApplication As Acrobat.CAcroApp
Dim AcrobatDocument As Acrobat.CAcroAVDoc
Dim Fcount As Long
Dim FieldName As String
On Error Resume Next
Set AcrobatApplication = CreatObject("AcroExch.App") '<----- this is where it messes up it says "SUB or FUNCTION is not defined". It's because I don't have the correct reference library
Set AcrobatDocument = CreatObject("AcroExh.AVDoc")
If AcrobatDocument.Open(Range("C:\288701\Desktop\Test.pdf"), "") Then
AcrobatApplication.Show
Set AcroForm = CreateObject("AFormAut.App")
Set Fields = AcroForm.Fields
Fcount = Fields.Count
For Each Fielf In Fields
FieldName = Fields.Name
ActiveSheet.Range("B" & ROWnum) = Field.Name
ActiveSheet.Range("C" & ROWnum) = Field.Value
ActiveSheet.Range("D" & ROWnum) = Field.Style
Next
End If
End Sub
When I'm checking these boxes what is the name?
Any help you can give would be very helpful? Thanks!
Copy link to clipboard
Copied
Great!!!!
I wonder if its posible to get more info from the fields (Name, Value, Style), like de # or the page. I was looking in the web, but no succes.
Copy link to clipboard
Copied
Use the JSObject to get information about the individual fields. Take a look here for some information about how to automate Acrobat using JSObject: Reading And Modifying PDF Form Fields with VBA - KHKonsulting LLC
And here is all the information you need to retrieve information about the fields using the JS interface (via JSObject):
Copy link to clipboard
Copied
By the way, I have Acrobat Pro version 11.
Copy link to clipboard
Copied
It's called just "Acrobat". See this tutorial for more information: Adobe Acrobat and VBA - An Introduction - KHKonsulting LLC
Copy link to clipboard
Copied
Thank you so much for your reply! It still didn't work though. Maybe there is another problem.
I checked the box for the reference.
Then I got This
any Ideas?
Copy link to clipboard
Copied
The correct function is "CreateObject" - you have it misspelled.
Copy link to clipboard
Copied
Yep, that was it. What a shame since English is my first and only language.
Thanks you for your help!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now