formatted text -
10-13-2004
, 10:08 PM
Hi
How would you handle this requirement?
1) Copywriters have hundreds of Word documents, one per product - that are
book abstracts with numerous pieces of information enclosed in pseudo markup
tags, such as <nticon>, <toc>, etc. Let's say for now they prefer to leave
these in Word, and that their odd tagging scheme is at least consistent.
2) They want each piece of data to be placed into discrete fields in a
Foxpro table so they can be output in an ad hoc order. They may take the
results and merge them into a custom Word doc, view them in a Crystal or R&R
report, etc.
3) There is already a program written to do this extraction, but it is not
currently pulling the formatting, i.e. bold, italic, etc.
4) The formatting needs are not sophisitcated. Only the basic formatting is
needed, no multiple fonts etc., mostly bold, italic, and bullets. In other
words, simple HTML is sufficient and while RTF works, it is overkill
Since my program in 3) already does everything except pull the formatting,
my thought is to find an HTML edit control like the RTF control that comes
with VFP, i.e. that could be bound to a memo field in a DBF and store the
formatted text.
I have had some success doing this with the RTF control, to the point of
auto-pasting the selections into the RTF control then sending the results to
memo fields. But there is a need to also output the formatted text to HTML,
and that control has no conversion method that I know of. I am aware that
Word can be automated to save a DOC as HTML, but the result is overly
complex and hard to parse.
What are some of the different ways you might habdle this in VFP?
thanks
wayne |