Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Michael Michael is offline
external usenet poster
 
Posts: 154
Default Merging text with HTML tags as data source into single word docume

Dear all, I have a .doc document and a data source from an oracle database
which stores HTML data as text. The front end application has no problem
recognizing the HTML tags and would display the HTML texts correctly. But
once I tried to merge this HTML text to the Word document, Word would show
the HTML tags as is. i.e. BRtest/BR instead of a line break before
'test', a &amp instead of &, and a Bbold/B instead of a bolded 'bold'
text.

I wonder if there's a way to make Word interpret the HTML tags automatically
during the mail merge?

Thanks in advance,
Michael
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Merging text with HTML tags as data source into single word docume

I wonder if there's a way to make Word interpret the HTML tags
automatically
during the mail merge?


No, sorry.

If I had to do this, I would probably
a. "roll my own merge" in VBA, using ADO to get the data from Oracle
b. either save the HTML snippets as .htm files which I would then include
either using VBA or via INCLUDETEXT, or
c. write my own interpreter that stuffed the field contents in and applied
the appropriate formats. And I'd only actually consider that if the allowed
HTML tags were a very, very simple subset of what HTML allows.

I can think of variations on that theme, but none which would substantially
reduce the complexity, except maybe if...you could write an Oracle PL/SQL
procedure (sorry, I'm way out of date with Oracle these days - perhaps it's
something else now) that emitted either a set of .htm files for each merge
record, or (conceivably) a single HTML file with bookmarks that identified
each field in each record. You might then be able to INCLUDETEXT the info,
complete with formatting, in your merge. Not my idea of fun.

Peter Jamieson


"Michael" wrote in message
...
Dear all, I have a .doc document and a data source from an oracle database
which stores HTML data as text. The front end application has no problem
recognizing the HTML tags and would display the HTML texts correctly. But
once I tried to merge this HTML text to the Word document, Word would show
the HTML tags as is. i.e. BRtest/BR instead of a line break before
'test', a &amp instead of &, and a Bbold/B instead of a bolded 'bold'
text.

I wonder if there's a way to make Word interpret the HTML tags
automatically
during the mail merge?

Thanks in advance,
Michael



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Michael Michael is offline
external usenet poster
 
Posts: 154
Default Merging text with HTML tags as data source into single word do

Thanks Peter.

"Peter Jamieson" wrote:

I wonder if there's a way to make Word interpret the HTML tags
automatically
during the mail merge?


No, sorry.

If I had to do this, I would probably
a. "roll my own merge" in VBA, using ADO to get the data from Oracle
b. either save the HTML snippets as .htm files which I would then include
either using VBA or via INCLUDETEXT, or
c. write my own interpreter that stuffed the field contents in and applied
the appropriate formats. And I'd only actually consider that if the allowed
HTML tags were a very, very simple subset of what HTML allows.

I can think of variations on that theme, but none which would substantially
reduce the complexity, except maybe if...you could write an Oracle PL/SQL
procedure (sorry, I'm way out of date with Oracle these days - perhaps it's
something else now) that emitted either a set of .htm files for each merge
record, or (conceivably) a single HTML file with bookmarks that identified
each field in each record. You might then be able to INCLUDETEXT the info,
complete with formatting, in your merge. Not my idea of fun.

Peter Jamieson


"Michael" wrote in message
...
Dear all, I have a .doc document and a data source from an oracle database
which stores HTML data as text. The front end application has no problem
recognizing the HTML tags and would display the HTML texts correctly. But
once I tried to merge this HTML text to the Word document, Word would show
the HTML tags as is. i.e. BRtest/BR instead of a line break before
'test', a &amp instead of &, and a Bbold/B instead of a bolded 'bold'
text.

I wonder if there's a way to make Word interpret the HTML tags
automatically
during the mail merge?

Thanks in advance,
Michael




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
Placing HTML tags around italic text. Erick Microsoft Word Help 3 January 10th 07 10:14 PM
Unexpected Text Changes Using HTML as Data Source Roger Bunch Mailmerge 2 November 20th 06 12:32 PM
MS Word merging data into a single document from Database [email protected] Mailmerge 1 June 21st 06 04:45 AM
Cannot open data source when merging excel addresses in word Confused Sandy Mailmerge 0 May 22nd 06 11:44 PM
when you use an access data source, the feilds in the word docume. jeffery Q?? Microsoft Word Help 0 March 2nd 05 04:13 PM


All times are GMT +1. The time now is 07:18 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"