meena

I wrote a code to insert a pic in word and resize width and height with the values in excell cells.

but they are not tallying.

 

For Each SHP In ActiveDocument.Shapes

        SHP.Width = CentimetersToPoints(xlBook.Sheets(1).Cells(i + 1, 4))

        SHP.Height = CentimetersToPoints(xlBook.Sheets(1).Cells(i + 1, 5))  

   Next

 

as per cell values

3.81 3.33
4.57 2.77
3.33 3.81

but i got 

 

 

3.83 3.36
3.83
3.36
3.49 3.95

  why so

By: Dasiga

Leave a Reply

Your email address will not be published. Required fields are marked *