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 2004

Tip: Looking for answers? Try searching our database.

HOW DO I ASSIGN A MERGEFIELD DATA RESULT DIRECTLY INTO A VARIABLE.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan, the Australian Optometrist - 07 Sep 2004 00:25 GMT
I am trying to get Word to extract data from my clinical database (.DBF
format) so I can produce personalised (referral) letters for clients.

I can extract the data into my letter template using a mailmerge feature
involving {MERGEFIELD fieldname} but would then like to assign the result to
a variable for use in a macro so I can manipulate the data and get the macro
to run on opening the template.

For example
- my database contains my patient's date of birth
- {MAILMERGE birthdate} returns 08-09-1958 as text
- I need to manipulate this data to convert the date of birth to an age
value to include in the referral letter.
- I was planning on doing this via an autostart macro but need to get the
macro to recognise the result of {MAILMERGE birthdate} as a variable unless
there is a better way of achieving the same result.

Any HELP / suggestions gratefully received
macropod - 08 Sep 2004 12:13 GMT
Hello Alan, the Australian Optometrist,

You don't need a macro to calculate someone's age. To see how you can do
this, and more than you ever thought you might want to do with dates & times
using Word fields, check out:
http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=365442
(url all one line)

Using the field approach, you can plug the mailmerge birthdate straight into
the field.

Cheers

> I am trying to get Word to extract data from my clinical database (.DBF
> format) so I can produce personalised (referral) letters for clients.
[quoted text clipped - 14 lines]
>
> Any HELP / suggestions gratefully received
macropod - 11 Sep 2004 12:07 GMT
Hi again,

wrong web address in my previous reply. Should have been:
http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=249902
(url all one line)

Cheers

> Hello Alan, the Australian Optometrist,
>
[quoted text clipped - 35 lines]
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.736 / Virus Database: 490 - Release Date: 9/08/2004

Rate this thread:






 
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.