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 / Programming / October 2007

Tip: Looking for answers? Try searching our database.

Replace Mergefield value with value from UDF

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DP Kelly - 12 Oct 2007 00:09 GMT
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.)

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.