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.)
Peter Jamieson - 23 Oct 2007 13:33 GMT
> 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

Signature
Peter Jamieson
http://tips.pjmsn.me.uk
> I've written a function in VBA to replace certain field values from a
> table
[quoted text clipped - 5 lines]
>
> ("UDF" = User-Defined Function, for anyone who needs to know.)