TIP: Click on subject to list as thread! ANSI
echo: wperfect
to: JEFF NEWMAN
from: BILL WHITE
date: 1997-12-17 00:00:00
subject: WP8 Modify Date

JN> Extremely limited 5.1 macrouser wants to praise one or more
JN> wp8 macro gurus......
JN> I am able to use the insert date function to either insert the
JN> current date or the date in a code function , so the next time
JN> that the file is opened, the current date will appear.
JN> However, I want to have a footnote at the bottom that will print
JN> the last time the file was modified. If the file was modified on
JN> 12/01/97, and I open it on 12/14/97, but do not change anything
     I use WordPerfect 6.1 for DOS, so I can't give you
specific instruction for writing your macro.  However,
I will give you the general idea as I write it in 6.1
and maybe you can modify it appropriately.
     When creating the document, make a bookmarks named
NewDate & EndNewDate where you want the new date and
bookmarks, OldDate & EndOldDate, in the footnote where
you want (surprise!) the old date.
     Now you write a macro (or record it): SEARCH for
NewDate, block, Search for EndNewDate, move to
clipboard (in 6.1 DOS that's Ctrl+Delete), insert new
date, SEARCH for OldDate, block, Search for EndOldDate,
delete it and paste from clipboard (Enter in 6.1 DOS).
     NOTE: This does NOT use the Date Code function
because you need that old date available to move it.
Once it's safely on the clipboard (or in a variable, if
you want), you can replace it using Insert Current Date
function.
     The 6.1 DOS macro looks like this:
DISPLAY(Off!)
PosDocTop
BookmarkFind("NewDate")
BlockOn(CharMode!)
BookmarkFind("EndNewDate")
PosCharPrevious
CutAndPaste
PosCharPrevious
DateText
BookmarkFind("OldDate")
BlockOn(CharMode!)
BookmarkFind("EndOldDate")
PosCharPrevious
DeleteCharNext
MoveModeEnd
SubstructureExit
     HTH.
  FIDO: Bill White @ 1:135/110 (Miami)
 InterNet: bill.white@110.sunshine.com
 * SLMR 2.1a * Damned if I do. Damned if I don't. So damn it, I will!
--- Maximus 2.01wb
---------------
* Origin: Miami Amateur Computer Club BBS/USR Courier V.E (1:135/110)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.