Word Height and Width NUmbers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I passing Excel charts and tables thru' to a word document and reizzing them in VBA,

.InlineShapes(1).Height = 75
.InlineShapes(1).Width = 150

What do the 75 and 150 refer to as it isn't millimetres?

thanks
 
Hi Paul

These measurements, and most of the ones used in VBA, are in "points".
By definition 1 inch = 72 points, so one point is a little more than
1/3 of a millimetre.

If you'd rather work in more familiar units, you can use the
conversion functions like this:

.InlineShapes(1).Height = MillimetersToPoints(75) ' 75 mm
or
.InlineShapes(1).Height = CentimetersToPoints(7.5) ' 7.5 cm

and in the other direction

MsgBox PointsToMillimeters(.InlineShapes(1).Height) & " mm"
or
MsgBox PointsToCentimeters(.InlineShapes(1).Height) & " cm"
 
Thank you, Soon after the post I found a reference to 1 point = 1/72 inch, but the conversion functions are great much easier to work with

Thanks again
Paul
 
Back
Top