Thanks for your inquiry. Please use the following code snippet for your requirements.
property specifies whether the shape is below or above text.
: Specifies horizontal alignment of a floating shape, text frame or floating table.
“Courier New”;mso-font-kerning:0pt;mso-ansi-language:PL;mso-no-proof:yes”> doc
= new Document(MyDir
foreach (Shape shp in
alignment of a floating shape
if (shp.HorizontalAlignment == Aspose.Words.Drawing.HorizontalAlignment.None)
shp.RelativeHorizontalPosition = RelativeHorizontalPosition.Margin;
Make the image float, put it behind text and center on the page.
shp.WrapType = WrapType.None;
shp.BehindText = true;
doc.Save(MyDir + @"out.docx");
Please note that Aspose.Words is quite different from the Microsoft Word's Object Model in that it represents the document as a tree of objects more like an XML DOM tree. If you worked with any XML DOM library you will find it is easy to understand and work with Aspose.Words. When you load a Word document into Aspose.Words, it builds its DOM and all document elements and formatting are simply loaded into memory. Please read the following articles for more information on DOM:
Shape represents an object in the drawing layer, such as an AutoShape, textbox, freeform, OLE object, ActiveX control, or picture. Shapes that can have text, can contain Paragraph and Table nodes as children and a Paragraph node may have DrawingML node. Please see the attached image for DOM of your document.
Paragraph is a block-level node and can be a child of classes derived from Story or InlineStory. The complete list of child nodes that can occur inside a paragraph consists of BookmarkStart, BookmarkEnd, FieldStart, FieldSeparator, FieldEnd, FormField, Comment, Footnote, Run, SpecialChar, Shape, GroupShape, SmartTag.
Please check the list of node type from here: