Replace Mergefield value with value from UDF

D

DP Kelly

I've written a function in VBA to replace certain field values from a table
with specific strings of text. My problem is calling that function in my
document. I can find all kinds of help on writing a UDF, but how do I call
the UDF from the document, so the UDF will be called during my mail-merge?
And, of course, I need to pass the value of the field to the UDF.

("UDF" = User-Defined Function, for anyone who needs to know.)
 
P

Peter Jamieson

I can find all kinds of help on writing a UDF, but how do I call
the UDF from the document, so the UDF will be called during my mail-merge?

The "approved" way to do this is to use WOrd's MailMerge Events - see the
Word Help file for further info. There certainly isn't a field type that
lets you do it, unless your requirement is simple enough to let you use the
DATABASE field approach at http://tips.pjmsn.me.uk/t0004.htm
 

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