Reply
 
Thread Tools Display Modes
  #1   Report Post  
Mark B
 
Posts: n/a
Default 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   Report Post  
Graham Mayor
 
Posts: n/a
Default

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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mailmerge Robert Mailmerge 0 August 19th 05 12:24 AM
Trying to suppress Select Table box in Excel-Word mailmerge Denise Mailmerge 4 June 21st 05 01:08 PM
Protect mailmerge document BillM Mailmerge 1 June 9th 05 12:58 PM
Textboxes in Mailmerge? zSplash Mailmerge 5 March 22nd 05 09:01 PM
Included Property in Word 2003 MailMerge Alessio Mailmerge 1 December 23rd 04 11:26 AM


All times are GMT +1. The time now is 09:18 PM.

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"