adding picture in word file and resizing and repositioning using c#
<p>hii i have a VBA macro for msword, the same functionality of macro i am implementing in my windows c# app. The macro is as follows </p>

<pre><code>    Sub TextWrapImageReSize()
    '
    ' TextWrapping and setting image position Test1 Macro
    '
    Dim myDoc As Document
    Dim ils As InlineShape
    Dim shp As Shape
    Set ils = ActiveDocument.InlineShapes(1)
    Set shp = ils.ConvertToShape
    With shp
     .Left = InchesToPoints(-0.35)
     .Top = InchesToPoints(4.5)
     .WrapFormat.Type = wdWrapBehind
     .RelativeVerticalPosition = wdRelativeVerticalPositionMargin
     .RelativeHorizontalPosition = wdRelativeHorizontalPositionMargin
     .LockAspectRatio = False
     .Height = InchesToPoints(10.2)
     .Width = InchesToPoints(6)
     ActiveDocument.Close SaveChanges:=wdSaveChanges

     End With
  End Sub 
</code></pre>

<p>this macro is working fine.. but while implementing the same in c# , i m getting exception</p>

<pre><code>      //the position you want to insert, here starting of document, before 1st para
      Range imgRange = oDoc.Paragraphs[1].Range; 

       // Set the file of the picture
       string imagePath = @"d:\images\image1.jpg";
       imgRange.InlineShapes.AddPicture(imagePath, ref  missing, ref  missing, ref
       missing); //dis is also working fine

       imgRange.InlineShapes[1].Height = (72 * 5F); //resizing image height
       imgRange.InlineShapes[1].Width = (72 * 5F); //resizing image width
       imgRange.InlineShapes[1].ConvertToShape().Left = 72F; /*this working fine * /
       imgRange.InlineShapes[1].ConvertToShape().Top = 72F; /*i am getting error
        here,showing "the requested member of collection doesnt exists" */
        imgRange.InlineShapes[1].ConvertToShape().WrapFormat.Type =       
         WdWrapType.wdWrapBehind; 
</code></pre>

<p>How can i add the macro functionality in my c# app,any ideas please.. Thanks in advance ..</p>
