These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Acrobat Interapplication

user53
Registered: Mar 12 2007
Posts: 6

InsertPages()
returns 0 for some pdf opened document not for all pdf.
Since there is no error or explanations for the reason Could you please advice
what to look at to resolve the problem/
Thank you

My Product Information:
Acrobat Standard 8, Windows
tedpadova
ExpertTeam
Registered: Dec 31 2005
Posts: 848
I'm assuming you're using a JavaScript. Do you have a folder level script granting privileges? If not, check out the JavaScript manual for writing folder level scripts to begin and end prilileges.

You need a folder level script for all actions you can't do with the Execute a Menu Item Action.

ted

The author of numerous books on Acrobat, Photoshop, Illustrator and the Adobe Creative Suite, and an international speaker on Adobe Acrobat, Ted Padova is a well-known PDF guru.

user53
Registered: Mar 12 2007
Posts: 6
Thank you for your responce but I am using
the following code ( I put only necessary lines to be short)
AcroApp = CreateObject("AcroExch.App")
PDDoc = CreateObject("AcroExch.PDDoc")
InsertPDDoc = CreateObject "AcroExch.PDDoc")
PDDoc.Create()
InsertPDDoc.Open(OutPdfPath)
.....
If PDDoc.InsertPages(-1, InsertPDDoc, 0, iNumberOfPagesToInsert, 1) = False Then
MsgBox("Error Inserting Pages ")
Exit For
End If
And this InsertPages(...) work fine for
some documents(that was opened before upon
name InsertPDDoc). But some pdf files the client sent to us are not working.It is
totally depends on pdf file that was opened.
user53
Registered: Mar 12 2007
Posts: 6
Hello Ted,
Could you please answer why it is different on different files? The same code could do InsertPages() for one pdf file and could not do for another.
What 'wrong' with that file where it could not do it. I would appreciate any
clue on this.
Thank you.