questions regarding word 2003 xml file structure

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I love this feature but I have some questions.

1. Is the file self contained or does it link to hidden files? It seems to
be self contained because if I copy the xml content to another file the file
still works. This is not the case for Word htm file format... which I guess
has some hidden files tagged to it

2. I want to edit the files programattically and distribute them to users
who need to edit them. Some of our users are still using older versions of
word and can't open these files. Is there a reader I can use or perhaps I can
programmatically convert the files I generate to normal .doc files? Any ideas?

Thanks


Ian B
 
G'day "Ianb" <[email protected]>,

1) The xml is self-contained but uses public namespaces. HTML requires
the folder be moved with the file, but is otherwise self-contained
else it would be useless as a web page :-)

2) If they're saved as xml, they can be opened in Word explicitly and
then resaved as a .doc for trivial consumption, either manually or
programatically.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Ianb reckoned:
 
Giday Word Heretic and thanks for your reply

This may be a stupid question (or two) but how does one programattically
save an xml file as a doc file?

Cheers

Ian
 
G'day "Ianb" <[email protected]>,

Do a

MyDoc = Documents.Open(<filename>,false)

this gets your xml file loaded inside a document container

Now do a MyDoc.SaveAs <filename>,wdFormatDocument


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Ianb reckoned:
 
Hi =?Utf-8?B?SWFuYg==?=,
2. I want to edit the files programattically and distribute them to users
who need to edit them. Some of our users are still using older versions of
word and can't open these files. Is there a reader I can use or perhaps I can
programmatically convert the files I generate to normal .doc files?
Besides using Automation to open the XML in Word 2003, then save as a word
document, as Steve suggests, you'd also have the option of applying an xslt
(transform) to a file in RTF or (Word) HTML. Word 2000 and Word 2002 users
could
open such files.
It seems to
be self contained because if I copy the xml content to another file the file
still works. This is not the case for Word htm file format...
I think this depends on what kind of HTML file you generate. See if changing
some of the options in Tools/Options/General/Web options helps in this regard.

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 :-)
 
G'day Cindy M -WordMVP- <[email protected]>,

Damn good point.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Cindy M -WordMVP- reckoned:
 
Thanks Cindy and Word Heretic

XSLT transform to .doc format sounds like alot of work. Wouldn't I need to
know the workings of a .doc file?

I have worked a wee bit with xml and xslt but am still a beginner. Can you
recommend a internet tutorial on this?

Cheers

Ian
 
G'day "Ianb" <[email protected]>,

You have a tag structure visible in your Save As XML document. A
simple XSLT would only select those attributes and tags you are
interested in seeing. It is arguably a lot less work than the VBA.

I stuck xslt tutorial into google and it came back with numerous
relevant links. The strict definitions are available at w3c.org


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Ianb reckoned:
 
Hi =?Utf-8?B?SWFuYg==?=,
XSLT transform to .doc format sounds like alot of work. Wouldn't I need to
know the workings of a .doc file?
Note that you cannot xslt to a Word *.doc file. As I mentioned in my previous
reply, it would have to be to RTF or HTML format. But for both, there are
Word equivalents that Word will recognize and open to display correctly, as
in a Word document, by all "modern" versions of Word (2000 and later). The
user can then save these as *.doc files, if he wishes.

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 :-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top