title: Word VSTO (VB.NET) - Get the image location, size, etc,?
body: <p>I am creating an add-in using VB.NET VSTO for MS-Word. In this program I need to retrieve the details such as Location (Left, Top) and Size (Height, Weight) of all the images on the document. I also want to retrieve the page number where the image is located. I use the following code,</p>
  
  <pre><code>        Dim i As Integer
          For i = 1 To Globals.ThisAddIn.Application.ActiveDocument.InlineShapes.Count
              If Globals.ThisAddIn.Application.ActiveDocument.InlineShapes(i).Type = Word.WdInlineShapeType.wdInlineShapePicture Then
                  strHeight = Globals.ThisAddIn.Application.ActiveDocument.InlineShapes(i).ScaleHeight()
                  strWidth = Globals.ThisAddIn.Application.ActiveDocument.InlineShapes(i).ScaleWidth()
              End If
          Next i
  </code></pre>
  
  <p>However, this can only retrieve the Size (Height, Weight). How to get the Location (Left, Top) and page number of the image?</p>