Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Søren Madsen Søren Madsen is offline
external usenet poster
 
Posts: 1
Default (Mail merge) Mergefield displays raw HTML

Hi,

I'm trying to insert fields which have HTML in them from an external
database - and the result is that the Mail merge fields displays the
raw HTML and white space.

Is there any way to display/treat the mergefield data as HTML? (The
HTML is very simple; just paragraphs, line breaks and strong's.)


Thanks in advance,

Søren Madsen
DK

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default (Mail merge) Mergefield displays raw HTML

There's no way to do it that avoids programming of some kind.

In essence, each chunk of HTML either has to be in a disk file (so you can
insert it using INCLUDETEXT or using VBA Insertfile) or possibly in the
clipboard so you can insert it using Paste with the relevant data type.

If you are merging to the printer, to individual letters or to e-mail, I
would start with an approach that performs a separate merge for each record
in the data source. That won't work for a "Directory"/"Catalog" type of
merge. I don't have code for this specific scenario and can't guarantee
that it will work, but if you search groups.google.com for "Jamieson
bTerminateMerge" you should find VBA code that does "one merge per record"
type merges. What you then need to do is either
a. add code to save the content of your HTML format field as a .htm file
(let's call it c:\temphtm\fieldx.htm) and include it using

{ INCLUDETEXT "c:\\temphtm\\fieldx.htm" \c HTML }
or
b. (if you want to avoid saving to a disk file) insert the HTML into your
document, select it, copy it to the clipboard, locate the place(s) you want
to insert it, paste special, selecting the appropriate format

I'm away for a few days but if you are still stuck I should be able to be
more specific.

Peter Jamieson

"Søren Madsen" wrote in message
oups.com...
Hi,

I'm trying to insert fields which have HTML in them from an external
database - and the result is that the Mail merge fields displays the
raw HTML and white space.

Is there any way to display/treat the mergefield data as HTML? (The
HTML is very simple; just paragraphs, line breaks and strong's.)


Thanks in advance,

Søren Madsen
DK


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get Word 2003 to keep data file with mail merge main documen Yourcareercoach Mailmerge 9 August 10th 06 12:19 PM
How do I email and HTML format mail merge? aholderread Mailmerge 3 July 13th 06 09:22 AM
how to suppress a line having a nil or zero value in a merge file Martin Mailmerge 7 June 7th 06 05:09 PM
mail merge with 2 different last names to the same address mail merge 2 different last names Mailmerge 1 April 6th 06 07:34 AM
Mail Merge only displays {{next record}} UggyWuggy Mailmerge 3 December 12th 05 08:44 AM


All times are GMT +1. The time now is 12:21 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"