Skip to main content
Pathagoras
Participating Frequently
February 19, 2016
Answered

Get Folder Name

  • February 19, 2016
  • 1 reply
  • 1160 views

I have an open Acrobat file. I can link to it and 'get' various parameters:

Set AVDocument = AcroApp.GetAVDoc(1)

Set PDDocument = AVDocument.GetPDDoc

GetOpenPDFTitle = AVDocument.GetTitle

GetOpenPDFName = PDDocument.GetFileName

What I want to obtain is the folder in which the PDDocument is located. I was hoping for something simple like

GetPDFFolder = PDDocument.GetFolder  or ".GetPath" or "GetFullName" or the like, but none are available.

How do I determine the name of the Path or Folder of the active PDF file?

This topic has been closed for replies.
Correct answer ReinhardF

Hi,

you could connect to JsObject (.. pddoc.GetJSObject) and then use the doc path statement from js.

Path

the device-independent path of the document, for example:

/c/Program Files/Adobe/Acrobat 5.0/Help/AcroHelp.pdf

Keep in mind that via IAC you can use nearly all js statements.

HTH, Reinhard

1 reply

ReinhardF
ReinhardFCorrect answer
Participating Frequently
February 19, 2016

Hi,

you could connect to JsObject (.. pddoc.GetJSObject) and then use the doc path statement from js.

Path

the device-independent path of the document, for example:

/c/Program Files/Adobe/Acrobat 5.0/Help/AcroHelp.pdf

Keep in mind that via IAC you can use nearly all js statements.

HTH, Reinhard

Pathagoras
Participating Frequently
February 20, 2016

Thanks. The code I ultimately used was this:

Set jso = PDDocument.GetJSObject

PDFPath = jso.Path