MS Word AutoText

  • Thread starter Thread starter Justern
  • Start date Start date
J

Justern

Is it possible to setup an auto text which is the date 14 Days Into the
Future of the creation date?
 
This is more complex than you might imagine, but it can be done. You would
design a date calculation field and then save that as an AutoText. See
http://addbalance.com/word/datefields2.htm for information on the different
kinds of ways to make a date calculation work. It includes links to pages
with fields and an explanation of different macros that can be used instead
of fields.

--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
Genius - however doesnt explain how to do it from the create date - merely
the current date, but still helps
 
You have to be a little imaginative and use CreateDate instead of Date or
StartDate
eg

{QUOTE { SET Delay 14 }{SET a{=INT((14-{CreateDate \@ M})/12)}}{SET
b{={CreateDate \@ yyyy}+4800-a}}{SET c{={CreateDate \@ M}+12*a-3}}{SET
d{CreateDate \@ d}}{SET
jd{=d+INT((153*c+2)/5)+365*b+INT(b/4)-INT(b/100)+INT(b/400)-32045+Delay}}{SET
e{=INT((4*(jd+32044)+3)/146097)}}{SET f{=jd+32044-INT(146097*e/4)}}{SET
g{=INT((4*f+3)/1461)}}{SET h{=f-INT(1461*g/4)}}{SET
i{=INT((5*h+2)/153)}}{SET dd{=h-INT((153*i+2)/5)+1}}{SET
mm{=i+3-12*INT(i/10)}}{SET
yy{=100*e+g-4800+INT(i/10)}}{=dd*10^6+mm*10^4+yy \# "00'-'00'-'0000"}
\@ "dddd, d MMMM yyyy"}

The delay at the beginning is the difference between the createdate and the
required future date and the format at the end is the display format of the
inserted date itself.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
I don't understand your reply. This is a set of fields. They will remain as
you enter them.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back
Top