Juno Posted August 23, 2002 Share Posted August 23, 2002 Is there a way to get the file path of the currently active document? GetFName only returns the name and GetFolderPath does not provide this as one of the selectors. Thanks. Quote Link to comment
Fuge Posted August 27, 2002 Share Posted August 27, 2002 There's no way to get the path to the open document from within VS. Fuge Quote Link to comment
Zeibin Posted April 29, 2005 Share Posted April 29, 2005 It seems to be undocumented in the function reference, but GetFPathName works for this. It returns a STRING. Here is a code sample I found on the Internet somewhere... {======================================} PROCEDURE Path; VAR objectName, RecName, thisFont : STRING; objectHand, recordHand, wallHand : HANDLE; Position : INTEGER; BEGIN IF (GetCustomObjectInfo(objectName, objectHand, recordHand, wallHand)) THEN BEGIN RecName := GetName(recordHand); PushAttrs; SetObjectVariableBoolean(objectHand, 800, true); TextOrigin(0, 0); CreateText(GetFPathName); SetName(objectHand, 'Path Stamp'); PopAttrs; IF PUPDATE THEN SetRField(objectHand, recName, 'Update', 'FALSE'); END; END; Run (Path); {======================================} Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.