openxml Insert image into an inline "inline shape" in word documents Get a reference of a Blip object


In office OpenXML, a picture that is inserted into a word document is considered a "Blip" Object or element. The class is derived from the DocumentFormat.OpenXml.Drawing the Blip must have an Embed value that is an imagePart ID. The Blip object then goes inside a BlipFill Object/element, and that also goes inside a graphicData Object/element and that in turn goes into a graphic object element. I'm pretty sure by now you've realized everything works like an XML tree. Sample Open XML tree below.

<a:graphic xmlns:a="">
                       <a:graphicData uri="">
                             <a:spLocks noChangeArrowheads="1" />
                           <wps:spPr bwMode="auto">
                               <a:off x="0" y="0" />
                               <a:ext cx="1234440" cy="1234440" />
                             <a:prstGeom prst="roundRect">
                                 <a:gd name="adj" fmla="val 16667" />
                             <a:blipFill dpi="0" rotWithShape="1">
                               <a:blip r:embed="Raade88ffea8d4c1b" />
                                 <a:fillRect l="10000" t="10000" r="10000" b="10000" />
                           <wps:bodyPr rot="0" vert="horz" wrap="square" lIns="91440" tIns="45720" rIns="91440" bIns="45720" anchor="t" anchorCtr="0" upright="1">
                             <a:noAutofit />