EmbeddedObjectProperties Class

Defines the EmbeddedObjectProperties Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is x:objectPr.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Spreadsheet.EmbeddedObjectProperties

Namespace:  DocumentFormat.OpenXml.Spreadsheet
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(ObjectAnchor), FileFormatVersions.Office2010)> _
Public Class EmbeddedObjectProperties _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As EmbeddedObjectProperties
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ObjectAnchor), FileFormatVersions.Office2010)]
public class EmbeddedObjectProperties : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • ObjectAnchor <x:anchor>

[ISO/IEC 29500-1 1st Edition]

18.3.1.56 objectPr (Embedded Object Properties)

This element specifies the visual, positional and cell linkage properties of an embedded object.

[Example: The following example demonstrates an embedded object that does not print and that is resized when the cells underlying it are resized:

<oleObjects>
  <oleObject … >
    <objectPr print="false" autoLine="false" r:id="rId5">
      <anchor sizeWithCells="true">
        <from> … </from>
        <to> … </to>
      </anchor>
    </objectPr>
  </oleObject>
</oleObjects>

end example]

Parent Elements

oleObject (§18.3.1.59)

Child Elements

Subclause

anchor (Object Cell Anchor)

§18.3.1.1

Attributes

Description

altText (Alternative Text)

Specifies alternative text for the object, for use by assistive technologies or applications.

[Example:

<objectPr altText="Alternate text" … />

end example]

The possible values for this attribute are defined by the ST_Xstring simple type (§22.9.2.19).

autoFill (Automatic Fill Flag)

Specifies whether the object’s fill formatting is provided automatically by the application.

[Example:

<objectPr autoFill="false" … />

end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

autoLine (Automatic Line Flag)

Specifies whether the object’s line formatting is provided automatically by the application.

[Example:

<objectPr autoLine="false" … />

end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

autoPict (Automatic Size Flag)

Specifies whether the object’s size is formatted automatically by the application.

[Example:

<objectPr autoPict="false" … />

end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

dde (Dynamic Data Exchange Flag)

Specifies whether the object is a Dynamic Data Exchange link.

[Example:

<objectPr dde="true" … />

end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

defaultSize (Default Size Flag)

Specifies whether the object is at its default size.

[Example:

<objectPr defaultSize="false" … />

end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

disabled (Disabled Flag)

Specifies whether the object is allowed to run an attached macro.

[Example:

<objectPr disabled="true" … />

end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

id (Relationship ID to Embedded Object Data)

Namespace: .../officeDocument/2006/relationships

Specifies the relationship ID for the relationship which targets the Embedded Object Part containing the embedded object data.

The specified relationship shall be of type https://schemas.openxmlformats.org/officeDocument/2006/oleObject or the document shall be considered non-conformant.

[Example: Consider an XML element which has the following id attribute:

<… r:id="rId1" />

The markup specifies the associated relationship part with relationship ID rId1 targets the part containing the corresponding embedded object information. end example]

The possible values for this attribute are defined by the ST_RelationshipId simple type (§22.8.2.1).

locked (Locked Flag)

Specifies that the object is locked when the sheet is protected.

[Example:

<objectPr locked="false" … />

end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

macro (Custom Function)

Specifies the custom function associated with the object. [Example: A macro script, add-in function, and so on. end example]

[Example:

<objectPr macro="Button1_Click()" … />

end example]

The possible values for this attribute are defined by the ST_Formula simple type (§18.18.35).

print (Print Flag)

Specifies whether the object is printed when the document is printed.

[Example:

<objectPr print="false" … />

end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

uiObject (UI Object Flag)

Specifies whether the object is a UI-only object. Applications should prevent UI-only objects from being selected and edited in their user interface.

[Example:

<objectPr uiObject="true" … />

end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

[Note: The W3C XML Schema definition of this element’s content model (CT_ObjectPr) is located in §A.2. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

EmbeddedObjectProperties Members

DocumentFormat.OpenXml.Spreadsheet Namespace