This class is used to represent an inline image in a Word document. The types of images that Word supports are jpg, png, bmp, and gif. Inline images are part of the InlineElement objects of an Element.

 public sealed class InlineImage : Element
Public NotInheritable Class InlineImage
		Inherits Element

To create a new inline image, use the insert methods for inline images from the Element or Position class.

The following sample demonstrates creating a inline image at the end of a new document and retrieving the first inline image of an existing document.


          //--- Insert a inline image at the end of a new document
          WordApplication app = new WordApplication();
          Document doc = app.Create();
          InlineImage image = doc.InsertImageAfter(@"C:\sample.jpg");

          //--- Get the first inline image of an existing document
          WordApplication app = new WordApplication();
          Document doc = app.Open(@"C:\sample.doc");
          InlineImage firstImage =
               (InlineImage)doc.GetElements(Element.Type.InlineImage)[0];
        

          '--- Insert an inline image at the end of a new document
          Dim app As New WordApplication()
          Dim doc As Document = app.Create()
          Dim image As InlineImage = doc.InsertImageAfter("C:\sample.jpg")

          '--- Get the first inline image of an existing document
          Dim app As New WordApplication()
          Dim doc As Document = app.Open("C:\sample.doc")
          Dim firstImage As InlineImage = _
               doc.GetElements(Element.Type.InlineImage)(0)
        

Name

Description

Height

Image

ImageFormat

Width

Name

Description

GetImage(InlineImage.Format)

Name

Description

Format