none
Need clarification of OLEStream Flags in MS-OLEDS document RRS feed

  • Question

  • I have some code that looks for OLE links in various Office files.  Section 2.3.3 in MS-OLEDS says the possible values for the OLEStream flag are 0 and 1.  However, for Excel files created in Excel 2003, the Flags field is set to 9 for linked xls files.  What does the value of 9 mean?  What is the proper way to check the Flags field for a link?

    Thanks,

    Stan

    Friday, January 27, 2012 4:06 PM

Answers

  • Stan,

    I've verified that, for your purposes, OR'ing with 0x1 is correct to determine if the object is an embedding or link.  The 0x8 flag (as well as a couple of others are used still but you may not see them often.  Specifically the 0x8 bit is used to determine presentation cache updating.  I will be discussing this with the COM team to decide if we need to clarify the language and/or add the other bits' definitions, depending on whether they are needed for interoperability.

    Thank you for brining this to our attention.

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

    • Marked as answer by S T A N Monday, January 30, 2012 3:51 PM
    Monday, January 30, 2012 2:54 AM
    Moderator

All replies

  • Hi Stan,

    Thank you for your question. A colleague will contact you soon to work on this issue.

    Regards,
    Mark Miller
    Escalation Engineer
    US-CSS DSC PROTOCOL TEAM

    Friday, January 27, 2012 7:17 PM
  • Hi Stan,
     
    I just created a test xls (2003 format using Excel 2010) file with a link to another one and I don't see the value of 9 for the \0x1Ole stream's flag field.  It's possible that this is a legacy flag that isn't used anymore.  Would you be able to send me the sample xls file you're working with (and accompanying linked xls) so that I can take a look?  If so, please send it to dochelp at Microsoft dot com, referencing the URL for this thread and my name.  Alternatively, since the specification is clear and there are no additional notes for this flag field, you could just OR the field with 0x00000001 to make sure it's a linked object. 

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

    Friday, January 27, 2012 9:26 PM
    Moderator
  • I just sent the sample files.  My experience is that the flags field is 0x1 if the Excel file was created in Excel 2010 and saved as .xls.  If it was originally created in Excel 2003, it has a flags value of 0x9.

    For now I am ORing the field with 0x1 as you suggested.

    Thanks,

    Stan

    Friday, January 27, 2012 10:44 PM
  • Stan,

    I've verified that, for your purposes, OR'ing with 0x1 is correct to determine if the object is an embedding or link.  The 0x8 flag (as well as a couple of others are used still but you may not see them often.  Specifically the 0x8 bit is used to determine presentation cache updating.  I will be discussing this with the COM team to decide if we need to clarify the language and/or add the other bits' definitions, depending on whether they are needed for interoperability.

    Thank you for brining this to our attention.

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

    • Marked as answer by S T A N Monday, January 30, 2012 3:51 PM
    Monday, January 30, 2012 2:54 AM
    Moderator
  • Thanks for your help
    Monday, January 30, 2012 1:38 PM