Microsoft KB Archive/70907

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 10:50, 21 July 2020 by X010 (talk | contribs) (Text replacement - ">" to ">")

Macro to Insert the Full Path of a Document

PSS ID Number: Q70907 Article last modified on 11-02-1994

5.50 6.00

MS-DOS

The information in this article applies to:
- Microsoft Word for MS-DOS, versions 5.5 and 6.0

SUMMARY

The full path and filename of the current file can be inserted into an open Microsoft Word document with the following macro.

<alt F><alt A><alt O><<set varone=field>><alt D><down> <enter><enter><alt N><<set vartwo=field>><alt O><<varone>> <enter><esc><<vartwo>>

Note: Left chevron (<<) is produced by pressing CTRL+[. Right chevron (>>) is produced by pressing CTRL+].

The above macro will go into the File Save As dialog box and insert the filename and path at the current cursor location.

The above macro differs from the “File_name” macro included with Word 5.5 in that the drive, directory, and the filename are inserted. File_name macro in the MACRO.GLY file inserts the filename only (no path information).

KBCategory: kbother kbmacro KBSubcategory: Additional reference words: ============================================================================= Copyright Microsoft Corporation 1994.