HTML text in Merge Field

T

TM360

Our application uses Word to do Mail Merges. The datasource is a tab
delimited text file that is generated from data in the database. We do
nothing to specify what the merge field delimiter is. Word normally
recognizes that it is a tab and it all works fine.

The problem happens when this text is included in the data that is merged
into one of the merge fields - <HTML>.

If <HTML> is included in the data that is merged, Word pops up the Select
Delimiter dialog box. This is not acceptable as the application that does
the merges runs unattended. I also can't seem to get the merge to work even
if I specify the correct delimiters (tab for the fields and return for the
records).

Has anyone else encountered this? Anybody know of a solution?

Note that it doesn't seem to be a problem if there are other HTML elements
in the merge. For example there can be <b>, <br>, <a href...> and so on.
These don't cause a problem. Just <HTML>.

Any help would be greatly appreciated.
 
C

Cindy M -WordMVP-

Hi Tm360,

How about if you put each field's content into "quotes"? I'd be surprised if
Word balks at something like "HTML inside of quotes".
Our application uses Word to do Mail Merges. The datasource is a tab
delimited text file that is generated from data in the database. We do
nothing to specify what the merge field delimiter is. Word normally
recognizes that it is a tab and it all works fine.

The problem happens when this text is included in the data that is merged
into one of the merge fields - <HTML>.

If <HTML> is included in the data that is merged, Word pops up the Select
Delimiter dialog box. This is not acceptable as the application that does
the merges runs unattended. I also can't seem to get the merge to work even
if I specify the correct delimiters (tab for the fields and return for the
records).

Has anyone else encountered this? Anybody know of a solution?

Note that it doesn't seem to be a problem if there are other HTML elements
in the merge. For example there can be <b>, <br>, <a href...> and so on.
These don't cause a problem. Just <HTML>.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
T

TM360

Actually the field's content is in quotes. And it's weird. It isn't a
problem if HTML elements other than <HTML> are included.
 
C

Cindy M -WordMVP-

Hi Tm360,
Actually the field's content is in quotes. And it's weird. It isn't a
problem if HTML elements other than <HTML> are included.
Sorry about not responding more promptly; very, very busy at the moment.

Could you send me a small sample data file with this and I'll see what I
can come up with? (I'll also pass it along to MS if I can't come up with a
way to use it, in the hopes it will get corrected in a future version)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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