A
Alan, the Australian Optometrist
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
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