Re: [Fwd: Re: xml to word document conversion]

"Ellinghaus, Lance" <[email protected]>
Newsgroups gmane.comp.python.xml
Message-ID <752A61D5C34D41478E638FC92AF9051B0174B518@usahm207.amer.corp.eds.com>
There is a XML comment tag that needs to be at the beginning of the
file...

Excel files begin with:

<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>

Word files begin with:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>


The mso-application comment is what tells Explorer and MS Word to use it
as a Word document. Leave the extension as .xml



Lance


-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Stefan Behnel
Sent: Friday, September 21, 2007 1:39 AM
To: [email protected]
Cc: [email protected]
Subject: Re: [XML-SIG] [Fwd: Re: xml to word document conversion]


[email protected] wrote:
> I found some clue in the below link.
> 
> http://www.windowsdevcenter.com/pub/a/windows/2004/09/07/XMLnword2003.
> html?page=1
> 
> That article in that link is using xslt to convert normal xml to 
> wordprocessingML which is used by ms word 2003 and above.
> I tested that example and it is working well.
> But there is some problem, the out put file is again an xml.
> If i open that xml file in the ms word 2003 it is opening as document.

> But when i rename it as .doc and open in the word , it is showing that

> xml code. I want the extension should be doc so that can open that 
> file directly using ms word. In the current case if it is xml file no 
> one will open that in word and the default option of xml editor will 
> be shown there.

What you are trying to solve is a Microsoft problem, not an XML problem
(wrong list).

You can try to pipe the result through MS Word after creating it, e.g.
using win32com (never used it myself).

Stefan
_______________________________________________
XML-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/xml-sig
_______________________________________________
XML-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/xml-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.