Log In    |    Knowledge Base    |    4D Home
Tech Tip: Retrieving a document path without opening the document
PRODUCT: 4D | VERSION: 2003.3 | PLATFORM: Mac & Win
Published On: May 6, 2004
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

Versions: 6.8.x and 2003.x

There are two commands that you can use to retrieve a document's path without having to open it: Open document and AP Select document (4D Pack) command.


- vRef:=Open document ("";"TEXT";Get Pathname)

The above code returns the document path in a default 4D variable named "document."

- vErr:=AP Select document ($resultPath;"TEXT")

The above code returns the document path to variable in the first parameter ($resultPath).