Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Ace Ace is offline
external usenet poster
 
Posts: 4
Default date + 10 days inserted into merged document?

How can I insert a date 10 days in the future into a merged document in Word?
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default date + 10 days inserted into merged document?

This is not that easy to do during the mailmerge operation. The easiest
thing would be to move your data source into and Excel spreadsheet and use
Excel's ability to handle the data arithmetic and then use the Excel
spreadsheet as the datasource.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Ace" wrote in message
...
How can I insert a date 10 days in the future into a merged document in
Word?



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default date + 10 days inserted into merged document?

As Doug says, this is not easy, but it can be done. Download the sample
document linked from
http://www.gmayor.com/insert_a_date_...than_today.htm and modify the
field code changing DATE to Mergefield Datefieldname and the delay from 301
to 10.

The result will be something like

{QUOTE{SET Delay 10}{SET a{=INT((14-{MERGEFIELD FIELDNAME \@ M})/12)}}{SET
b{={MERGEFIELD FIELDNAME \@ yyyy}+4800-a}}{SET c{={MERGEFIELD FIELDNAME \@
M}+12*a-3}}{SET d{MERGEFIELD FIELDNAME \@ 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"} \@ "d MMMM yyyy"}

Credit to fellow MVP 'Macropod' for the work put into this.

--

Graham Mayor - Word MVP

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


Ace wrote:
How can I insert a date 10 days in the future into a merged document
in Word?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Update Date SF New Users 9 October 14th 07 12:30 AM
Wrong record inserted in merge document Holly Mailmerge 1 May 26th 06 11:18 AM
Mail Merge Data Question Tom Bean Mailmerge 7 May 26th 06 12:02 AM
How to get a date merge field to show a date 60 days in the future George Mailmerge 6 March 2nd 06 07:17 AM
Mail Merge document and Date field niv Mailmerge 3 November 22nd 05 08:50 PM


All times are GMT +1. The time now is 01:48 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"