EmbeddedObject class
TOC
Collapse the table of content
Expand the table of content

EmbeddedObject class

Office 2013 and later

Inline Embedded Object. When the object is serialized out as xml, its qualified name is w:object.

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

[ChildElementInfoAttribute(typeof(Shape))]
[ChildElementInfoAttribute(typeof(RoundRectangle))]
[ChildElementInfoAttribute(typeof(Group))]
[ChildElementInfoAttribute(typeof(ImageFile))]
[ChildElementInfoAttribute(typeof(Line))]
[ChildElementInfoAttribute(typeof(Oval))]
[ChildElementInfoAttribute(typeof(PolyLine))]
[ChildElementInfoAttribute(typeof(Rectangle))]
[ChildElementInfoAttribute(typeof(OleObject))]
[ChildElementInfoAttribute(typeof(ObjectLink))]
[ChildElementInfoAttribute(typeof(Arc))]
[ChildElementInfoAttribute(typeof(Curve))]
[ChildElementInfoAttribute(typeof(Shapetype))]
[ChildElementInfoAttribute(typeof(Drawing))]
[ChildElementInfoAttribute(typeof(Control))]
[ChildElementInfoAttribute(typeof(ObjectEmbed))]
public class EmbeddedObject : OpenXmlCompositeElement

[ISO/IEC 29500-1 1st Edition]

object (Embedded Object)

This element specifies that an embedded object is located at this position in the run’s contents. The layout properties of this embedded object, as well as an optional static representation, are specified using the drawing element (§17.3.3.9).

[Example: Consider a run which consists of an embedded object which is in line with the text in that paragraph (i.e. on the line and affects the line height). That run would be specified using the following WordprocessingML:

<w:r>
  <w:object>
    <w:drawing>
      …    </w:drawing>
  </w:object>
</w:r>

The object element indicates that an embedded object and its positioning data are located at the current position in the run (e.g. an embedded object). end example]

Parent Elements

r (§22.1.2.87); r (§17.3.2.25)

Child Elements

Subclause

control (Embedded Control)

§17.3.3.3

drawing (DrawingML Object)

§17.3.3.9

movie (Embedded Video)

§17.3.3.17

objectEmbed (Embedded Object Properties)

§17.3.3.20

objectLink (Linked Object Properties)

§17.3.3.21

Attributes

Description

dxaOrig (Original Image Width)

Specifies the original (natural) width of the image representation of the current control within the document. Some vector image formats do not store a native size within their format, and this attribute shall only be used in those cases to store this information, so that the image can be appropriately restored as needed.

If this element is excluded, then the natural size of the image as stored in its format shall be used.

[Example: Consider the following WordprocessingML for an embedded object:

<w:object w:dxaOrig="3360" w:dyaOrig="2520">
  …</w:object>

The dxaOrig attribute has a value of 3360, which specifies that the image used for the embedded object doesn't store its native width, but that width should be 3360 twentieths of a point. end example]

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

dyaOrig (Original Image Height)

Specifies the original (natural) height of the image representation of the current control within the document. Some vector image formats do not store a native size within their format, and this attribute shall only be used in those cases to store this information, so that the image can be appropriately restored as needed.

If this element is excluded, then the natural size of the image as stored in its format shall be used.

[Example: Consider the following WordprocessingML for an embedded object:

<w:object w:dxaOrig="3360" w:dyaOrig="2520">
  …</w:object>

The dyaOrig attribute has a value of 2520, which specifies that the image used for the embedded object doesn't store its native height, but that height should be 2520 twentieths of a point. end example]

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

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

© ISO/IEC29500: 2008.

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