[XML-SIG] [Fwd: Re: xml to word document conversion]

Ellinghaus, Lance lance.ellinghaus at eds.com
Fri Sep 21 21:19:11 CEST 2007


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: xml-sig-bounces at python.org [mailto:xml-sig-bounces at python.org] On
Behalf Of Stefan Behnel
Sent: Friday, September 21, 2007 1:39 AM
To: prajwala.manchikatla at azri.biz
Cc: xml-sig at python.org
Subject: Re: [XML-SIG] [Fwd: Re: xml to word document conversion]


prajwala.manchikatla at azri.biz 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  -  XML-SIG at python.org
http://mail.python.org/mailman/listinfo/xml-sig


More information about the XML-SIG mailing list