DrawingML Object Positioning
Inline objects are inline with the text and affect the line height and layout of the line, just as a character of the same size would affect the line. They are inserted into a <w:drawing> element with a <wp:inline> element.
Below is an example of a picture that is inline.
The <wp:inline> element can have a number of attributes related to the distance between the picture and the surrounding text. However, they have no effect when the picture is displayed inline. The attributes can be maintained and will have effect in the event that the picture is changed to be floating.
Below are the possible child elements of <wp:inline>.
Specifies locking properties for a picture. The <wp:cNvGraphicFrame> element contains an empty <a:graphicFrameLocks> element with a number of possible attributes that determine the locking properties. If the attributes are not specified, then it is assumed that the properties can be changed. For example, to disallow changing the aspect ratio, specify the noChangeAspect attribute as true.
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 22.214.171.124.
The following are the most useful attributes:
An example of locking the aspect ratio is below.
<a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/>
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 126.96.36.199.19.
Specifies common non-visual DrawingML properties. See also Pictures - Image Properties - Non-Visual Properties. An id, name, title and description for a picture can be specified with attributes on the <wp:docPr> element: <wp:docPr id="222" name="Blue hills.jpg" title="This is the title" descr="This is the description"/>. The id is an integer and specifies a unique identifier. The name is a string and typically stores the original file name. The title is a string that specifies teh caption. The descr is alternative text used for assistive technologies which do not display the picture.
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 188.8.131.52.
Specifies the amount which should be added to each edge of the image when a drawing effect is applied to the image. The size of the image is specified with the <wp:extent> element. The additional size needed to accommodate an effect is stored in the <wp:effectExtent> element, and will be used to calculate the appropriate line height for inline objects or wrapping. The element has four attributes, each storing a value of length in EMUs: b (bottom), l (left), r (right), and t (top). Below is an image with a reflection applied to the bottom, and an addition 781050 EMUs to accommodate the reflection.
<wp:extent cx="2438400" cy="1828800"/>
<wp:effectExtent l="0" t="0" r="0" b="781050"/>
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 184.108.40.206.
Specifies the height and width of the object using two attributes: cx for length of the rectangle in EMUs and cy for the width of the rectangle in EMUs.
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 220.127.116.11.
Specifies a single graphic object. The specification for the object is up to the document author/application. It can contain a <a:graphicData> element, which itself can contain any element in any namespace and which also has a uri attribute that is used to identify the stored data or the "server" that can process the contents of the tag. For Microsoft Word, pictures are specified within the pic namespace (xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture"). Other sorts of graphics can be inserted, such as charts. Microsoft Office supports a specific set of uri values, including values for pictures, charts, diagrams, etc.
. . .
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 18.104.22.168.16.