Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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.

↑ Back to the top


Cause

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

↑ Back to the top


Resolution

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

↑ Back to the top


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>

↑ Back to the top


Keywords: kboffice12yes, kbfreshness2006, kbentirenet, kbopenfile, kbxml, kbtshoot, kbprb, kb

↑ Back to the top

Article Info
Article ID : 888579
Revision : 1
Created on : 1/7/2017
Published on : 9/22/2011
Exists online : False
Views : 355