Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Merging 2 pdf files using VBA

New Here ,
May 24, 2018 May 24, 2018

Hi, I have two (win2pdf) pdf files, call them pdf1.pdf and pdf2.pdf. I want to add the first page of pdf2.pdf to pdf1.pdf. I want to use MS Excel VBA to automate this. I copied some code from another forum but get errors straight away on variable declarations i.e.

Dim PartDocs() As Acrobat.CAcroPDDoc

Not sure what version of Acrobat I have and whether as a result referencing the correct Tools|Reference value.

Can't see Acrobat in the tools|reference.

Any help would be appreciated.

Thanks

Aziz

TOPICS
Edit and convert PDFs
6.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
May 24, 2018 May 24, 2018

You need to know what version of Acrobat you have. The best way to tell is by looking at the About screen (in the "Help" menu). What does it report? If you only have the free Adobe Reader, you are out of luck. If you do have Adobe Acrobat (either Standard or Pro), chances are that you did not include the reference to the TLB in your project. Take a look here for some information about how to create a small project: Adobe Acrobat and VBA - An Introduction - KHKonsulting LLC ​This post is a few years old and a bit dated, but you should still be able to follow along with your versions of Acrobat and Excel.

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 24, 2018 May 24, 2018
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 24, 2018 May 24, 2018

You need to know what version of Acrobat you have. The best way to tell is by looking at the About screen (in the "Help" menu). What does it report? If you only have the free Adobe Reader, you are out of luck. If you do have Adobe Acrobat (either Standard or Pro), chances are that you did not include the reference to the TLB in your project. Take a look here for some information about how to create a small project: Adobe Acrobat and VBA - An Introduction - KHKonsulting LLC ​This post is a few years old and a bit dated, but you should still be able to follow along with your versions of Acrobat and Excel.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 25, 2018 May 25, 2018
LATEST

I only have the basic version of Acrobat which explains why "Acrobat" doesn't appear in the list of Tools|References.

Thanks for pointing me in the right direction Karl.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines