|
|
|
date: Thu, 2 Feb 2006 11:54:13 -0800,
group: microsoft.public.word.oleinterop
back
Re: Word Automation without Word running
Thank you both for the reply and Cindy I read your reply just now on the
other forum.
Just to better explain:
I have a web app that allows my users to create a proposal for service to
be done. They have a series of 'Elements' to choose from that will specify
what they want to appear in the final document. Each element is a word
document.
After they choose the elements the app then creates a temp document, loops
through the list of elements they chose, then writes the contents of the
opened document inside the temp, closes the opened document and goes to the
next one.
The final output would be all the element pages inside one document.
Now my problem was, trying to open a word document in a FileStream and
reading its contents..sure it works. But there is no way of knowing what is
Bold, Italic, Underlined, Font size or anything. I needed to merge the
documents 100% exactly how it is in the original. So doing it that way is
useless.
My only option if I wanted to do it that way was use Word by referencing it.
Which by doing so opens a new instance of Word. Which is pointless. 10 people
visiting the site doing this the whole server bogs down.
What I ended up doing is forcing the client to convert to .rtf and im
opening it by FileStream and reading/writing and it works fine.
Point is, I should of been able to view what is bold, italic, underlined,
and get font size without having to mess with Word application itself being
opened.
Hope this makes sense
date: Fri, 3 Feb 2006 10:29:14 -0800
author: unknown
Re: Word Automation without Word running
Hi =?Utf-8?B?c3RldmUud2VsYm9ybkBiaXR3aXNlc29sdXRpb25zLmNvbQ==?=,
> I have a web app that allows my users to create a proposal for service to
> be done. They have a series of 'Elements' to choose from that will specify
> what they want to appear in the final document. Each element is a word
> document.
> After they choose the elements the app then creates a temp document, loops
> through the list of elements they chose, then writes the contents of the
> opened document inside the temp, closes the opened document and goes to the
> next one.
>
> The final output would be all the element pages inside one document.
>
> Now my problem was, trying to open a word document in a FileStream and
> reading its contents..sure it works. But there is no way of knowing what is
> Bold, Italic, Underlined, Font size or anything. I needed to merge the
> documents 100% exactly how it is in the original. So doing it that way is
> useless.
>
> My only option if I wanted to do it that way was use Word by referencing it.
> Which by doing so opens a new instance of Word. Which is pointless. 10 people
> visiting the site doing this the whole server bogs down.
>
> What I ended up doing is forcing the client to convert to .rtf and im
> opening it by FileStream and reading/writing and it works fine.
>
> Point is, I should of been able to view what is bold, italic, underlined,
> and get font size without having to mess with Word application itself being
> opened.
>
> Hope this makes sense
>
Yes, this makes sense. RTF, HTML or, if you can be sure the users have Word
2003, XML are definitely the correct approaches for the kind of application you
describe. Note, too, that for Office 12 Microsoft has announced it will be
releasing conversion filters so that all preveious versions of Word can open the
XML file formats. In about a year, XML would become an option for you if you
need to support all current versions of Word.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
date: Sat, 04 Feb 2006 18:45:56 +0100
author: Cindy M -WordMVP-
|
|