3

I'm looking for a way to merge multiple PDF files into one with VBScript, only with Acrobat and Distiller - without using any third-party software. Although I really searched hard for a solution on the web, I couldn't find one. Can someone please help me out here?

Thank you! S.

1 Answer 1

2

I've had success in the past using Acrobat's Interapplication Communication feature from VBScript. I don't have a full version of Acrobat to test with, but this should at least give you a starting point:

Dim app
Set app = CreateObject("AcroExch.App")

Dim srcDoc, destDoc
Set srcDoc = CreateObject("AcroExch.PDDoc")
Set destDoc = CreateObject("AcroExch.PDDoc")

srcDoc.Open srcPath
destDoc.Create
destDoc.InsertPages 0, srcDoc, 0, srcDoc.GetNumPages(), 0
destDoc.Save 0, destPath

srcDoc.Close
destDoc.Close
app.Exit

The OLE Automation section of the API reference contains a list of the available classes and methods.

Sign up to request clarification or add additional context in comments.

1 Comment

Hi Cheran, Thanks a lot, I will try that and get back to you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.