none
Why is date1904 ignored? RRS feed

Answers

  • Hi Dave,

    It looks to me like the original file was written in Office 2007, then the problem is observed in Office 2010.  This is due to a bug in Office 2007 where date1904 was incorrectly handled.  Therefore, when Office 2010 loads a file written by Office 2007, it sets the internal 1904 setting to false (ignoring the date1904 element).  In order to correct this, the only thing you will be able to do is rewrite the file using Office 2010 which your editing accomplished. 

    I will submit a behaviour note to MS-ODRAWXML to inform implementers of this. 

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

    • Marked as answer by DavidThi808 Wednesday, July 20, 2011 2:54 PM
    Tuesday, July 19, 2011 4:30 AM
  • Yes, that's correct.  It's what Office 2010 does.

    Tom

    • Marked as answer by DavidThi808 Wednesday, July 20, 2011 2:54 PM
    Tuesday, July 19, 2011 5:02 PM
  • Hi Dave,

    The AppVersion element in the app.xml of the props part has the version:

     

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">
     <Template>Normal</Template>
     <TotalTime>2</TotalTime>
     <Pages>1</Pages>
     <Words>195</Words>
     <Characters>1116</Characters>
     <Application>Microsoft Office Word</Application>
    ...
     <AppVersion>12.0000</AppVersion>
    </Properties>
    


    This will tell you what you need.

    Tom

     


    • Marked as answer by DavidThi808 Wednesday, July 20, 2011 2:54 PM
    Wednesday, July 20, 2011 2:33 PM

All replies

  • Hi Dave,

    I'm looking into this.  I see some indication in the chart code that datasources can influence the date1904 setting but haven't nailed it down yet.  I'll get back to you soon.

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

    Monday, July 18, 2011 7:21 PM
  • Hi Dave,

    It looks to me like the original file was written in Office 2007, then the problem is observed in Office 2010.  This is due to a bug in Office 2007 where date1904 was incorrectly handled.  Therefore, when Office 2010 loads a file written by Office 2007, it sets the internal 1904 setting to false (ignoring the date1904 element).  In order to correct this, the only thing you will be able to do is rewrite the file using Office 2010 which your editing accomplished. 

    I will submit a behaviour note to MS-ODRAWXML to inform implementers of this. 

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

    • Marked as answer by DavidThi808 Wednesday, July 20, 2011 2:54 PM
    Tuesday, July 19, 2011 4:30 AM
  • Hi;

    Our engine needs to handle files from both versions. Should our rule be that if it was created in Word 2007 then date1904 = false regardless of setting?

    thanks - dave


    The future of B.I. - Raw & Uncut
    Tuesday, July 19, 2011 5:07 AM
  • Yes, that's correct.  It's what Office 2010 does.

    Tom

    • Marked as answer by DavidThi808 Wednesday, July 20, 2011 2:54 PM
    Tuesday, July 19, 2011 5:02 PM
  • Hi Tom;

    Thank you - we can do that. What is the recomended way to determine the version of Word used? And critical question - how can we tell what version a file in compatibility mode is in so on Word 2010 we know if the DOCX file is being treated as Word 2007 mode?

    thanks - dave


    The future of B.I. - Raw & Uncut
    Tuesday, July 19, 2011 8:06 PM
  • Hi Dave,

    The AppVersion element in the app.xml of the props part has the version:

     

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">
     <Template>Normal</Template>
     <TotalTime>2</TotalTime>
     <Pages>1</Pages>
     <Words>195</Words>
     <Characters>1116</Characters>
     <Application>Microsoft Office Word</Application>
    ...
     <AppVersion>12.0000</AppVersion>
    </Properties>
    


    This will tell you what you need.

    Tom

     


    • Marked as answer by DavidThi808 Wednesday, July 20, 2011 2:54 PM
    Wednesday, July 20, 2011 2:33 PM