Microsoft KB Archive/39327: Difference between revisions

From BetaArchive Wiki
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="">&gt;<Esc>Untitled<<ELSE>&gt;<<SET filename=FIELD>&gt; <Esc><<filename>&gt;<<ENDIF>&gt;
<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&gt;N.
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="">&gt;<esc>Untitled<<ELSE>&gt; <<SET filename=FIELD>&gt;<esc><<filename>&gt;<<ENDIF>&gt;
<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&gt;7.
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.