Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default VBA Codes to combine PDF files

I had a VBA Code to combine PDF files. It works file with my Adobe Acrobat
7.0. But recently I installed an Acrobat 8.0 reader, and then found out that
the code doesn't function properly. Then I uninstalled it. My code still
doesn't work.

This is the part of the code that doesn't work:

Dim objPDFDoc As Object
Set objPDFDoc = New AcroPDDoc

Now everytime the program goes to the "Set objPDFDoc = New AcroPDDoc". It
automatically exit the procedure.

Could anybody help me to figure out what is the reason and how to solve the
problem? Thanks a lot!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default VBA Codes to combine PDF files

As it appears you are using late-binding, that should be

Dim objPDFDoc As Object
Set objPDFDoc = createObject("<AcrobatLib.AcroPDDoc")

Change <AcrobatLib to the correct libarary.

Otherwise use early-binding (ToolsReferences) and
Dim objPDFDoc As <AcrobatLib.AcroPDDoc
set objPDFDoc = New<AcrobatLib.AcroPDDoc

Previous versions (6 and below ?) of the Reader were not available to
automation. Can't say about v8.

NickHK

"salut" wrote in message
...
I had a VBA Code to combine PDF files. It works file with my Adobe Acrobat
7.0. But recently I installed an Acrobat 8.0 reader, and then found out

that
the code doesn't function properly. Then I uninstalled it. My code still
doesn't work.

This is the part of the code that doesn't work:

Dim objPDFDoc As Object
Set objPDFDoc = New AcroPDDoc

Now everytime the program goes to the "Set objPDFDoc = New AcroPDDoc". It
automatically exit the procedure.

Could anybody help me to figure out what is the reason and how to solve

the
problem? Thanks a lot!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default VBA Codes to combine PDF files

Thanks a lot for your reply!

I got my acrobat 7.0 reinstalled, and tried both late-binding approach and
early-binding approach. Neither of them worked.

Looks like this might be the problem.

When I search AcroPDDoc by pressing F2. it shows that it belows to Acrobat.
But apparently My VBA code doesn't recognize the name "Acrobat" very well
because it doesn't change the cases of letters. I can type in
"aCRObat.AcroPDDoc" and it is not going to change it. But I can't say if it
is loaded in my reference library or not. Because when I type "aCRObat." the
VBA Editor will show me a dropdown box from which I can select AcroPDDoc.

I am totally confused by the situation. Whatever I try, it always jump out
of the subrutine directly at the "Set objPDFDoc = New AcroPDDoc" statement.

"NickHK" wrote:

As it appears you are using late-binding, that should be

Dim objPDFDoc As Object
Set objPDFDoc = createObject("<AcrobatLib.AcroPDDoc")

Change <AcrobatLib to the correct libarary.

Otherwise use early-binding (ToolsReferences) and
Dim objPDFDoc As <AcrobatLib.AcroPDDoc
set objPDFDoc = New<AcrobatLib.AcroPDDoc

Previous versions (6 and below ?) of the Reader were not available to
automation. Can't say about v8.

NickHK

"salut" wrote in message
...
I had a VBA Code to combine PDF files. It works file with my Adobe Acrobat
7.0. But recently I installed an Acrobat 8.0 reader, and then found out

that
the code doesn't function properly. Then I uninstalled it. My code still
doesn't work.

This is the part of the code that doesn't work:

Dim objPDFDoc As Object
Set objPDFDoc = New AcroPDDoc

Now everytime the program goes to the "Set objPDFDoc = New AcroPDDoc". It
automatically exit the procedure.

Could anybody help me to figure out what is the reason and how to solve

the
problem? Thanks a lot!




Reply
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
Codes needed to copy same one row from more than 300 Excel files Joe Roberto Excel Discussion (Misc queries) 1 September 25th 09 12:07 PM
combine change event codes J.W. Aldridge Excel Programming 2 January 20th 07 04:42 PM
combine 2 files into one Calculate Date range Excel Worksheet Functions 3 November 14th 06 02:37 PM
Combine files andibevan Excel Programming 1 November 11th 04 04:12 PM


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

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"