Skip to main content
A newer version of this page is available. .

How to: Add Floating Picture

To add a floating picture to the document, use the ShapeCollection.InsertPicture method.

document.AppendText("Line One\nLine Two\nLine Three");
Shape myPicture = document.Shapes.InsertPicture(document.CreatePosition(15), 
    System.Drawing.Image.FromFile("beverages.png"));
myPicture.HorizontalAlignment = ShapeHorizontalAlignment.Center;