In that case, it's clear you'd want to save the files in the XML file format
and transform the XML - Word automation wouldn't be required for this part.
Printing, however... Printing a Word document requires the Word application
to be installed and to run. Whether you want to try that on a server...
Otherwise, you might look for tools that convert Word's native XML
(WordProcessingML aka WordML) to something like Adobe pdf, RTF or HTML.
Something that can be printed without having to use the Word application.
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 :-)
thanks!
> If the xml approach seems the best, it seems then that i should be able to
> use the .net architecture to do the transformation? I am having a hard time
> finding any resources on using xsl/wordml using xpath to help in the dynamic
> portions of the wordml document.
>
Certainly. You can use any XML tools you wish.
The complete WordML schema, plus a "Word 2003 SDK" that is primarily concerned
with the XML features, can be downloaded from msdn (the Office section).
You don't give us a lot of detail about how the templates/documents should be
used, so it's really difficult to make any concrete suggestions. For example,
if you're only interested in manipulating specific "target areas" it might make
a lot of sense to set up a schema for this data, link it to the document (in
the Word UI, while designing the document or template), then insert XML tags
for the "targets". Since this involves declaring your own namespace, you can
simply pick up all the tags/nodes in that namespace and ignore everything else.
Since you're programming in .NET you might also want to look at what VSTO 2005
offers. If you're not really using the Word UI at all, this is probably overkill
compared to attaching an XML schema and using XML tags. But I thought I should
mention it :-)
Sorry, I was away last week...
> Would you know of any tools for the Printing part, anything you can
> suggest/recomend ? Is there a possible loss as a result of conversion to
> another format ?
>
No, I'm not personally familiar with any such tools, although I've seen them
mentioned, here and there. Internet search, and asking in format-specific groups
(XML or PDF groups, for example) is what you'll need to do. Formatting loss is
certainly possible, given that some things could be Word-specific and not easily
implemented in another format. Basics, though, such as character formatting and
paragraph layout, should be fairly reliable.