Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Extrapolate Age from Birthday using Mailmerge
I am exporting a birthday from my database into word to do a mail merge for a
form. Is there any way Word can figure out a person's age as of the current day based upon the birthday field from the database to merge onto a form? Thanks! |
#2
|
|||
|
|||
This is possible, but quite complex to do with fields, as you will see from
the example shown below. The better plan is to see Macropod's master work on the subject at http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 Copy and edit the example to your requirements substituting your mergefield for the ask and ref fields. {QUOTE{SET by {MERGEFIELD Birthday \@ yyyy}}{SET bm {MERGEFIELD Birthday \@ M}}{SET bd {MERGEFIELD Birthday \@ d}}{SET yy {DATE \@ yyyy}}{SET mm {DATE \@ M}}{SET dd {DATE \@ d}}{SET md{=IF((mm=2),28+(mm=2)*((MOD(yy,4)=0)+(MOD(yy,400 )=0)-(MOD(yy,100)=0)),31-((mm=4)+(mm=6)+(mm=9)+(mm=11)))}}{Set Years{=yy-by-(mmbm)-(mm=bm)*(ddbd)}}{Set Months{=MOD(12+mm-bm-(ddbd),12)}}{Set Days{=MOD(md+dd-bd,md) \# 0}}"Age is {Years} Year{IF{Years}= 1 "" s}, {Months} Month{IF{Months}= 1 "" s} and {Days} Day{IF{Days}= 1 "" s}."} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Mark B wrote: I am exporting a birthday from my database into word to do a mail merge for a form. Is there any way Word can figure out a person's age as of the current day based upon the birthday field from the database to merge onto a form? Thanks! |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mailmerge | Mailmerge | |||
Trying to suppress Select Table box in Excel-Word mailmerge | Mailmerge | |||
Protect mailmerge document | Mailmerge | |||
Textboxes in Mailmerge? | Mailmerge | |||
Included Property in Word 2003 MailMerge | Mailmerge |