Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/39327

From BetaArchive Wiki

Word Macro That Inserts Filename in Document

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

4.00 5.00 5.50 6.00

MS-DOS

SUMMARY

A filename stamp, similar to the built-in date and time stamps, can be created with the following macro:

<Ctrl Esc>ts<<IF FIELD="">><Esc>Untitled<<ELSE>><<SET filename=FIELD>> <Esc><<filename>><<ENDIF>>

This macro takes the filename and inserts it into a document. If the document hasn’t been named yet, the macro inserts the word “Untitled”.

This macro is included in the Word 5.00 MACRO.GLY file. The name of the entry is FILENAME.MAC^<CTRL+F>N.

In Word 5.50, the following macro inserts the filename:

<Ctrl Esc>fa<<IF FIELD="">><esc>Untitled<<ELSE>> <<SET filename=FIELD>><esc><<filename>><<ENDIF>>

This macro is included in the Word 5.50 MACRO.GLY file. The name of the entry is FILENAME.MAC^<CTRL+V>7.

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