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

getPath

jcc31
Registered: Dec 19 2006
Posts: 2

Hi, I'm trying to get a path string from an open document but not sure how to code it.
 
I know that I need
app.execMenuItem("Open");
to have the user go and choose the file.
 
I know I need
getPath
to get a path string
 
So the why I was doing this is not working can someone help me here.
 
var t = app.execMenuItem("Open");
 
var mypath=app.getPath({I don't understand this part here});
 
And Then I would like it to go in my insertPages
 
this.insertPages({nPage: -1, cPath: mypath,});
 
Or there a better way of doing this?

My Product Information:
Acrobat Pro 6, Macintosh
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
the "getPath" function is for geting standard Acrobat paths, not the document path. User the "this.path" property to get the documents folder location.

Thom Parker
WindJack Solutions
[url=http://www.windjack.com]www.windjack.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://partners.adobe.com/public/developer/en/acrobat/sdk/
pdf/javascript/AcroJS.pdf]Acrobat JavaScript Reference[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script