~[ ? and tricky datasource questions

N

NIck S

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
 
P

Peter Jamieson

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.
 

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