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 / Mailmerge and Fax / April 2004

Tip: Looking for answers? Try searching our database.

~[ ? and tricky datasource questions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NIck S - 02 Apr 2004 12:06 GMT
Hello ....

I am sitting in front of a system where I cannot see the contents and
structure of a macro that provides me with a list of mailmerge variables.So
I cannot change it and I cannot see or directly read from its datasource.

Here is   the 'problem'

We have a 3rd party application that integrates with MS Word. Part of the
functionality
provided is a set of mail merge variables, whos source is ultimately the
application
database (via some com/VB interface).

We want to be able to access the value of these mail merge variables from
within
a VB macro. However when inserted into the document the fields appear as
~[FieldName:XXX] rather than the usual ?FieldName?. We have not seen this
format before - any ideas? Also when the variables are inserted into the
document (i.e. before the merge) should we be able to get their value via
VBA? We can do this in a simple example using the standard ?FieldName?
format.

When the document is merged is there any way in VBA of getting the value of
the merged
variables - even if the merged document is a new one?

nick
Peter Jamieson - 04 Apr 2004 13:05 GMT
It sounds to me as if the 3rd party system you are using is not actually
using Word MailMerge, but is intended to replace the built-in mailmerge
functionality completely. For example, if you use Alt-F9 to reveal the field
codes, the chances are that the "~[FieldName:XXX]" type texts do not
correspond to { MERGEFIELD } fields. In fact they may just be plain text
that the 3rd party system locates by searching for ?[, or maybe they are
bookmarked in some way.

My guess is that you won't be able to do much about this without contacting
the supplier of the 3rd party system. However, it might be worth starting
the VBA editor and using Tools|References to find any objects provided in
the 3rd party package to see if you can re-use them in some way.

Signature

Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/

> Hello ....
>
[quoted text clipped - 24 lines]
>
> nick

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.