Microsoft KB Archive/39327: Difference between revisions
m (Text replacement - "<" to "<") |
m (Text replacement - ">" to ">") |
||
Line 11: | Line 11: | ||
A filename stamp, similar to the built-in date and time stamps, can be created with the following macro: | A filename stamp, similar to the built-in date and time stamps, can be created with the following macro: | ||
<Ctrl Esc>ts<<IF FIELD=""> | <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 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 | 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: | In Word 5.50, the following macro inserts the filename: | ||
<Ctrl Esc>fa<<IF FIELD=""> | <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 | 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. | KBCategory: kbother kbmacro KBSubcategory: Additional reference words: ============================================================================= Copyright Microsoft Corporation 1994. |
Revision as of 10:28, 21 July 2020
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.