Inline shape ============ Word allows a graphical object to be placed into a document as an inline object. An inline shape appears as a ```` element as a child of a ```` element. Candidate protocol -- inline shape access ----------------------------------------- The following interactive session illustrates the protocol for accessing an inline shape:: >>> inline_shapes = document.body.inline_shapes >>> inline_shape = inline_shapes[0] >>> assert inline_shape.type == MSO_SHAPE_TYPE.PICTURE Resources --------- * `Document Members (Word) on MSDN`_ * `InlineShape Members (Word) on MSDN`_ * `Shape Members (Word) on MSDN`_ .. _Document Members (Word) on MSDN: http://msdn.microsoft.com/en-us/library/office/ff840898.aspx .. _InlineShape Members (Word) on MSDN: http://msdn.microsoft.com/en-us/library/office/ff840794.aspx .. _Shape Members (Word) on MSDN: http://msdn.microsoft.com/en-us/library/office/ff195191.aspx MS API ------ The Shapes and InlineShapes properties on Document hold references to things like pictures in the MS API. * Height and Width * Borders * Shadow * Hyperlink * PictureFormat (providing brightness, color, crop, transparency, contrast) * ScaleHeight and ScaleWidth * HasChart * HasSmartArt * Type (Chart, LockedCanvas, Picture, SmartArt, etc.) Spec references --------------- * 17.3.3.9 drawing (DrawingML Object) * 20.4.2.8 inline (Inline DrawingML Object) * 20.4.2.7 extent (Drawing Object Size) Minimal XML ----------- .. highlight:: xml This XML represents my best guess of the minimal inline shape container that Word will load:: Specimen XML ------------ .. highlight:: xml A ``CT_Drawing`` (````) element can appear in a run, as a peer of, for example, a ```` element. This element contains a DrawingML object. WordprocessingML drawings are discussed in section 20.4 of the ISO/IEC spec. This XML represents an inline shape inserted inline on a paragraph by itself. The particulars of the graphical object itself are redacted:: Schema definitions ------------------ .. highlight:: xml ::