Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 888579 - Last Review: September 22, 2011 - Revision: 3.0
XML files may open in Internet Explorer instead of opening in the expected Office program when the ContentType header contains the charset parameter
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.
This problem occurs if the ContentType header in the XML file includes the
charset parameter.
To resolve this problem, remove the
charset parameter from your XML file.
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>
APPLIES TO
- Microsoft Office InfoPath 2007
- Microsoft Office Excel 2007
- Microsoft Office Word 2007
- Microsoft Office InfoPath 2003
| kbopenfile kbxml kbtshoot kbprb KB888579 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
|
Anonymous User
- hroberts NOSPAM-AT-NOSPAM ormat.com
|
Report As Irrelevant
|
| Written:
9/26/2007 10:51 AM |
|
|