MS Word AutoText



Justern
07-10-2005, 12:05 AM
Is it possible to setup an auto text which is the date 14 Days Into the
Future of the creation date?

Graham Mayor
07-10-2005, 12:05 AM
Yes, but it is complicated - see
www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Justern wrote:
> Is it possible to setup an auto text which is the date 14 Days Into
> the Future of the creation date?

Charles Kenyon
07-10-2005, 12:05 AM
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.

"Justern" <justernNO@SPAMhotmail.com> wrote in message
news:dadivl$cs$1@nnrp.waia.asn.au...
> Is it possible to setup an auto text which is the date 14 Days Into the
> Future of the creation date?
>

Justern
07-10-2005, 12:05 AM
Genius - however doesnt explain how to do it from the create date - merely
the current date, but still helps

Graham Mayor
07-10-2005, 12:05 AM
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
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Justern wrote:
> Genius - however doesnt explain how to do it from the create date -
> merely the current date, but still helps

Justern
07-10-2005, 12:05 AM
I got that done...however i couldnt get it to stick to create date - thanks

"Graham Mayor" <gmayor@mvps.org> wrote in message
news:OyYpfmhgFHA.3164@TK2MSFTNGP15.phx.gbl...
> 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
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
> Justern wrote:
>> Genius - however doesnt explain how to do it from the create date -
>> merely the current date, but still helps
>
>
>
>
>

Graham Mayor
07-10-2005, 12:05 AM
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
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Justern wrote:
> I got that done...however i couldnt get it to stick to create date -
> thanks
> "Graham Mayor" <gmayor@mvps.org> wrote in message
> news:OyYpfmhgFHA.3164@TK2MSFTNGP15.phx.gbl...
>> 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
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>
>> Justern wrote:
>>> Genius - however doesnt explain how to do it from the create date -
>>> merely the current date, but still helps


MS Word AutoText