none
Open a Word 2010 Open XML file in Word 2003 RRS feed

  • Question

  • Cindy,

    One more question when i open a word 2010 XML document in word 2003 i see below tags.

    How can i get rid of them?

    Thursday, October 24, 2013 5:36 PM

All replies

  • Exactly how have you saved the 2010 document and what command are you using to open it in Word 2003? This looks to me as if you've used the Document.Content.WordOpenXML to write the xml package information to a file, saved it as *.xml and opened that...

    Word 2003 can only open a document in the newer file format if the Compatibility Pack has been installed. In that case, you open the *.docx file, as you would any other file.


    Cindy Meister, VSTO/Word MVP, my blog

    Friday, October 25, 2013 3:19 PM
    Moderator
  • I have given the MIME Type as

    Response.ContentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"

     push the below content into Response  using "Binary write".

     

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <?mso-application progid="Word.Document"?>
    <pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage"><pkg:part pkg:name="/_rels/.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="512"><pkg:xmlData><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/></Relationships></pkg:xmlData></pkg:part><pkg:part pkg:name="/word/_rels/document.xml.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml"  .............................. etc

    When  I open this Generated Document in 2010 , I get the below pop up message

    "The file Sample.docx cannot be opened because there are problems with the contents "

    When I open the same genarated Document in 2003, I get below tags along with the contents

    Now i Change the MIME type to

    Response.ContentType = "application/msword"

    In Word 2010 , It Is openeing without any issues (with File extension  as .doc)

    In Word 2003 , I still get the unwanted tags

    Tuesday, October 29, 2013 12:16 PM
  • Hi Cindy,

    I dont save the document nor access the documents using the Word objects , WordProcessingml objects.

    We are saving the  Document in "Word 2010 XML" Format. and opening the same in Machine which has Word 2003 & Compatibility pact 2007 installed.

    We understand that XML structre in word 2003 and Word 2010 has changed.

    But we would like to know how to overcome this.

    Since Microsoft is no more supporting Word 2003 we are migrating to Word 2010, but still few of our Users are continuing to use Word 2003.

    In word 2003 we have used Custom XML, which is no longer supported in Word 2007 & above , so we have modified the custom XMls to Content Controls.

    After modifying to content Controls , when we open the template in 2003 we get the unwanted tags and same with the document generated using URL in 2003 machine.

    We are able to open the same in Word 2010 with no issues.

    We have asked this question in diferent forums. We would need a guidance to proceed with this.

    Tuesday, October 29, 2013 1:06 PM
  • We are generating a document using a Word 2010 XML template via VB.Net code with out using word objects.(Using Office Open XMl)

    We are getting unwanted tags when we open the Word 2010 XML Template in  MS Word 2003.

    Please suggest how to generate document compatible for MS Word 2003 & above.

    The Below code is Currently used in generating the document.

    We have given the MIME Type as

    Response.ContentType = "application/msword"

    And pushed the below content into Response  using "Binary write".

    --- Sample XML template

     <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <?mso-application progid="Word.Document"?>
    <pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage"><pkg:part pkg:name="/_rels/.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="512"><pkg:xmlData><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/></Relationships></pkg:xmlData></pkg:part><pkg:part pkg:name="/word/_rels/document.xml.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml"  .............................. etc

    We have Users using different version of office.

    User Y has Word 2010 , and when he generates the document from the URL, it opens successfully.

    User X has Word 2003 & Compatibility Pack Office 2007 installed , when he opens the document he gets unwanted tags as shown below.

    Tuesday, October 29, 2013 1:06 PM
  • <<In word 2003 we have used Custom XML, which is no longer supported in Word 2007 & above , so we have modified the custom XMls to Content Controls.

    After modifying to content Controls , when we open the template in 2003 we get the unwanted tags and same with the document generated using URL in 2003 machine.

    We are able to open the same in Word 2010 with no issues.>>

    You won't be able to use documents with content controls in Word 2003. The technology is not supported in that version, even though Word 2003 can open a *.docx file if the Compatibiltiy Pack is installed. That only converts documents, it doesn't supply newer technology in older versions.

    A Word 2003 document saved as a 2003 WordProcessingML *.xml file that containing Custom XML Nodes (that last word is important!) should, as I recall, still open and display the nodes in Word 2010. Are you not seeing that? That's the only way you'll be able to use the same documents in both 2003 and 2010.

    The only other possibility I can see would involve a massive investment in programming. You'd have to create your own file converter that "transforms" the Word 2003 XML to Word Open XML, mutating the custom xml nodes to content controls, and then back again when the document should be re-opened in 2003. There is no "plug-in" tool or code for this that anyone can give you.

    You can ask in as many forums as you can find, the answer is still going to be the same.

    In the long run, I think it will cost you less to migrate those "few users" to a newer version of Word...


    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, October 29, 2013 6:56 PM
    Moderator
  • Cindy,

    I totally agree with your point.

    We are not going to work on a template with Content Controls in Word 2003 Machine.I do understand that Content Controls are introduced in machine in word 2007 an dabove, so we cant use this feature in Word 2003.

    I believe Office Open XML approach of generating a document has a big advantage i.e. irrespective of the Word installed in the server where the application is hosted,the word takes the version installed in the Client machine who initiates the generation of a document with a button click.

    We have users in Office 2003 & Office 2010.

    I am generating a document with content controls from URL in Office 2003 machine.

    We can view a document with Content Controls of a format .docx in MS Office 2003 machine without any issue.

    But a word 2010 XML document  .xml opened in MS Office 2003 machine  displays unwanted tags like relationship, package etc....

    And When I am generating same document with content controls from URL in Office 2010 machine i face no issues.

    Wednesday, October 30, 2013 9:37 AM
  • <<But a word 2010 XML document  .xml opened in MS Office 2003 machine  displays unwanted tags like relationship, package etc....>>

    Why would you be saving a Word 2010 document as an XML file?

    The XML you show us is the OPC flat file format, as best I can tell. The Compatibility Pack doesn't know how to work with that. But I don't understand why it would be necessary for you to use it?


    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, October 30, 2013 2:52 PM
    Moderator