XML files may open in Internet Explorer instead of opening in the expected Office program when the ContentType header contains the charset parameter (888579)



The information in this article applies to:

  • Microsoft Office InfoPath 2003
  • Microsoft Office InfoPath 2003, Service Pack 1 (SP1)
  • Microsoft Office Word 2003
  • Microsoft Office Excel 2003

SYMPTOMS

If the ContentType header in your XML file contains the charset parameter, the XML file may open in Microsoft Internet Explorer instead of opening in the expected Microsoft Office program.

CAUSE

This problem occurs if the ContentType header in the XML file includes the charset parameter.

RESOLUTION

To resolve this problem, remove the charset parameter from your XML file.

MORE INFORMATION

The following code does not open the XML file in Microsoft Office Word 2003:
<%Response.ContentType = "text/xml; charset=utf-8"%>
<?xml version="1.0" encoding="UTF-8" ?> 
<?mso-application progid="Word.Document"?> 
<w:wordDocument xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">
  <w:body>
	<w:p>
	  <w:r>
		<w:t>My test document.</w:t>
	  </w:r>
	</w:p>
  </w:body>
</w:wordDocument>
The following code does open the XML file in Word 2003:
<%Response.ContentType = "text/xml%>
<?xml version="1.0" encoding="UTF-8" ?>
<?mso-application progid="Word.Document"?>
<w:wordDocument xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">
  <w:body>
	<w:p>
	  <w:r>
		<w:t>My test document.</w:t>
	  </w:r>
	</w:p>
  </w:body>
</w:wordDocument>

Modification Type:MajorLast Reviewed:3/25/2005
Keywords:kbopenfile kbXML kbtshoot kbprb KB888579 kbAudDeveloper