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

browseForDoc only for PDFs?

Moop
Registered: May 18 2010
Posts: 14
Answered

I'm trying to automate some page generation. Some of the pages need to be generated from TIFF files. The directories from which these TIFFs come are consistent enough for a person to follow them...but not for a computer(sometimes people append information to the end of individual part directory names). I can do this manually by going to Document - Insert Pages - From File, and it lets me select from all sorts of wonderful file types. But when this line runs in my script:

var insrtpath = app.browseForDoc({bSave: false, cFilenameInit: "*.tiff",cFSInit: ""});

I'm only allowed to pick from PDF documents. The drop down box at the bottom doesn't let me pick anything else. I stuck the *.tiff in these in hopes that it would help and Acrobat steam rolled right over it and changed it to .pdf. Changing it to .tiff manually in the box doesn't help.

Does browseForDoc only work for PDFs? Am I missing some top secret parameter? Is there another method that can provide similar functionality(I've been looking to no avail)?

Even if I have to forgo this portion and do it manually, it won't be the end of the world. Nowhere near as important as my stamps hiding underneath button icons thread(Which you should really go look at. It's fun for the whole family, I promise)

My Product Information:
Acrobat Standard 9.3.1, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Here's a nifty little workaround I discovered some time ago: when the open dialog opens, enter an asterisk (*) into the file name field and press Enter. It will display all files and you can select any of them.
I think this only works on Windows machines, though.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Moop
Registered: May 18 2010
Posts: 14
Works great, thanks