Re: Best option for writing to MS Word



Hi Jerry,

generating word documents using OLE is quite slow, especially when you are
creating tables and selecting, formatting, etc. I remember once I generated
400 pages document and it run for one day.
For our last project we used different approach, we're generating XML, then
converting it using stylesheets to HTML, then open in MS Word to print it.
All documents are stored in database as data and generated when needed, it
takes second or two to generate quite complicated invoice with 10 pages...
If you need word format, you can just save from word using OLE.
It is much faster and you can do very complicated formatting using XSL
stylesheets. Those stylesheets we created by exporting word document to HTML
(Word creates all css) and then manually adding XSL commands inside the
HTML. Results are quite impressive. I tried to do something similar in
Crystal Reports and I gave up - formatting options in Word are much much
better.

Ivan

"Jerry Hayes" <jhayes@nospam-connexability-dot-com> wrote in message
news:4633d9be$1@xxxxxxxxxxxxxxxxxxxxxxxxx
I need to write to MS Word format, (not RTF, not OpenXML). Don't need to
read it, just *write* it.

Any recommendations? Or is ole automation my only option?

Thanks all,

Jerry



.