|
Download
FILSTAMP.ZIP (FilenameStamper.wcm, v1.02, FilStamp.wcm, v1.04;
07/12/04; ZIP file=24,629 bytes)
FilenameStamper.wcm
- WP
8,9,10,11,12
FilStamp.wcm
- WP 6,7,8,9,10,11,12 |
Two macros are included:
FilenameStamper.wcm
|
Advantages:
Places the filename at the bottom
of Footer A or Footer B, or at the top of Header A or
Header B, starting on page 1. Thus you can use FileStamper in
the same footer or header as other material.
Also, while WordPerfect ships
with a macro (FileStmp.wcm) that puts the filename in a footer
or header, it does not automatically remove old filename stamps
the way this macro does. (See Footnote 1)
Operation:
Footer A is used by default. You can modify this in the
redlined User
Modification Area. See Footnote
2.
Other modifications available:
- Insert just the filename (no
path)
- Add a print date after the filename,
in one of several date formats
- Justify the inserted material
left, center, or right
- Adjust the relative font size
and intensity (text shade) of the filename stamp
- Suppress the display of the
menu or exit message (see macro's code)
The macro uses a special paired-code
bookmark ("FilenameStampLocationMarker") to
locate and place the filename stamp. If a bookmark already exists
in the document from a prior use of the macro, the bookmark and
adjacent filename stamp are deleted, then re-created to ensure
that only the most up-to-date stamp is used.
Be aware that if you insert another
header or footer of the same type (A or B) later in the document,
the new header or footer will replace the old one, and your filename
will not show from that point onward. If this is likely, choose
the header or footer (A or B) least likely to be impacted by
additional inserted headers or footers.
Note also that if the current
file has not yet been saved (and therefore is unnamed), playing
the macro will cause the Save As window to appear. If you Cancel
the Save As window, no file stamp will be inserted.
This macro may be a good candidate
to use as a template macro triggered at print time. Or you can
simply assign it to a toolbar button or keystroke combination.
(See TIPS below.)
|
Page
Top
Filstamp.wcm -- originally written back in 1996 --
stamps your documents with identification on just the last
page (only) of the document.
|
Operation:
FILSTAMP goes to the bottom of
the current document and inserts two hard returns, then types
the complete filename (drive and pathname), plus your initials
or other indentifier such as "DRAFT COPY" (see the
redlined
User Modification Area in
the macro's code to change the default identifier, etc.).
It then types the date and time
the file was last edited (i.e., saved), as a text string so that
this date indicates the edit date. Finally it types the date
it was printed, as a code so that this date will change if you
print a copy of the document on some future date. If you make
changes to the document, run FILSTAMP again to update the stamp.
The default file stamp -- printed
in 7-point Arial -- looks something like this:
C:\My Documents\Sample.wpd
[DRAFT COPY] Edited: January 19, 2006 (9:07am)
Printed: January 21, 2006.
The date and time can be omitted
by selecting a check box when the macro is played. The macro
checks for an existing file stamp and erases it before it stamps
a new one.
The macro can be used as a template
macro to automate stamping. Or you can simply assign it to a
menu, toolbar button or keystroke combination. (See TIPS below.)
|
Page
Top
TIPS:
You
can assign a macro to a menu,
toolbar, or keystroke combination.
You
can use a file macro (i.e., one on your disk) as a template macro
(i.e., embedded inside the template itself), and have it play
whenever you print the document.
To do this, copy the file macro
into the appropriate template and associate it with the PRE PRINT
trigger, like this:
- Edit the template on
which the current document is based. (See WP's online Help <F1
key> for more information.) When the template is open for
editing, click the Copy/Remove Objects button on the Template
Property Bar.
- In the Copy/Remove Template
Objects dialog that pops up, select "Macros on Disk"
from the Object Type drop list, then choose the name of the macro
in the Source drop list.
- Click the Copy>> button,
then click Close to close the dialog window. The macro should
now be embedded inside the template as a template macro (as distinguished
from a file macro -- i.e., one that is simply stored on your
disk).
- Back in the template editing
window, click the Associate button on the Template Property Bar.
Click the Triggers radio button, then select Pre Print in the
left window. In the Macros drop list, choose the name of the
template macro and click OK. (You can always remove the associate
with Pre Print by selecting No Association.)
- Save the template with File,
Save. Test the operation of the macro by loading a new document
based on the template, typing some text into it, and then printing
it with File, Print.
If you need to edit the template
macro later, while editing the template click on Tools, Template
Macro, Edit.
Note that only template macros
can be associated with a trigger. Macros on disk cannot be associated
with template triggers, but they can be copied into the
template first with Copy/Object on the Template Property Bar,
and then associated with a trigger, as described above. The two
most common triggers used with simple template macros are Post
New (play on opening a new document based on the template) and
Pre Print (play at print time). For more information on triggers,
see the WordPerfect help file topic, "Triggering macros
from templates" and "'Trigger'
a macro from inside a template to play automatically at specific
times."
For more information about automating
templates, see "Automating WordPerfect Templates" in
the top section of the Tips page here.
Note also that the template on
which all new documents are based (the "default" template)
is named "Create a blank document," and is usually
found in the Custom WP Templates section of your File, New from
Projects list. On disk, the default template's filename is something
like WP9US.WPT, where 9=WordPerfect 9, and US=the US language
versions. For the actual location on your system, in WordPerfect
click on Tools, Settings, Files, Template tab, and look at the
data in the Default fields.
Page
Top
|
|
Footnote 1
The FILESTMP macro that ships
with WordPerfect is designed to place the filename in a header
or footer -- both of which are "repeating elements."
That is, they show up on every page until replaced or discontinued.
Unless the cursor is positioned on the last page and no
header or footer exists of the type (A or B) you choose, when
you play the FILESTMP macro any existing header or footer will
be modified (it's due to the way the macro is coded).
While it is possible to modify
the FILESTMP macro's code to make the filename show up on the
last page regardless of any existing header or footer -- as mentioned,
new headers/footers "discontinue" previous ones of
the same type -- it might be easier for you to use one of the
macros above.
In particular, Filstamp.wcm makes
the filename-stamping process more reliable, since it does not
impact existing headers or footers -- which would be especially
important if the user modified the document extensively, and
then played the macro again.
Footnote 2
Note that a macro is a WordPerfect
file with a ".wcm" filename extension, and can be opened,
viewed, and edited like an ordinary document. Most of the macros
on this site have information or instructions at the top of the
main macro code. Most have a redlined section in the macro's
code that users can modify, something called the "User Modification
Area." Follow the instructions there to modify various macro
defaults, such as initial menu choices or initial values for
the macro to use when it processes the document.
Page
Top
|