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 / Mailmerge and Fax / September 2005

Tip: Looking for answers? Try searching our database.

Extrapolate Age from Birthday using Mailmerge

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark B - 24 Sep 2005 14:01 GMT
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!
Graham Mayor - 25 Sep 2005 06:30 GMT
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 www.wopr.com/cgi-bin/w3t/showthreaded.pl?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-(mm<bm)-(mm=bm)*(dd<bd)}}{Set
Months{=MOD(12+mm-bm-(dd<bd),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}."}

Signature

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

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

> 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!
 
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.