Mail Merge use of new functions

T

TerryM

I am VERY new to mail merge so please excuse my ignorance but I would like to create and call a function that uses data from a linked spreadsheet. In this particular example I would simply like to calculate the date difference (Datediff) bewtween two values and then, depending on the result, display a specified string on the document. I have written the function but I cannot see how I can call it ... can it be done?

Thanks in eager anticipation,

Terry
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?VGVycnlN?=,
I am VERY new to mail merge so please excuse my ignorance but I would like to
create and call a function that uses data from a linked spreadsheet. In this
particular example I would simply like to calculate the date difference
(Datediff) bewtween two values and then, depending on the result, display a
specified string on the document. I have written the function but I cannot see
how I can call it ... can it be done?>

Unfortunately, Word has no way to call VBA functions through fields. You should
do the calculation in Excel, in an additional column, and pass that literal
value to Word.

If you have Word 2002, there is another way, using Mail Merge Events. I think
you may find an example for that on my website. I will be gone for the next 10
days, though, so won't be able to help for a couple of weeks.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top