Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2006

Tip: Looking for answers? Try searching our database.

Every next page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Idle - 18 Nov 2006 15:27 GMT
Greets,

How to create a document where every next page has a date with a next day
then the previous page usig fields or macros.

for example:

page 1 - 18/11/06
page 2 - 19/11/06
page 3 - 20/11/06

etc...

Any help appreciated,
 Thanks
Graham Mayor - 18 Nov 2006 15:51 GMT
Based on the work of fellow Word MVP 'macropod'
www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902 , the following field
in the header will do that - better to download the sample document and copy
the field then edit the delay and final switch rather than try to
reconstruct it ;)

{QUOTE{SET Delay{ = { Page }-1 }}{SET a{=INT((14-{DATE \@ M})/12)}}{SET
b{={DATE \@ yyyy}+4800-a}}{SET c{={DATE \@ M}+12*a-3}}{SET d{DATE \@ 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"} \@ "dd/MM/yy"}

This will put taday's date in the header on page 1 and tomorrow's on page 2
etc. If you don't want the dates to update, change all the DATE fields for
CREATEDATE fields.

Signature

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

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

> Greets,
>
[quoted text clipped - 11 lines]
> Any help appreciated,
>  Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.