If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
(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
|
|||
|
|||
(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 |
Thread Tools | |
Display Modes | |
|
|