Defining and changing the current used measurement unit

A

Amir

Hi!

How can I use VBA to find and change Word's current used measurement unit,
e.g. Lines, Points, Centimeters etc.?

I'm asking that because I'm having difficulties using VBA functions because
I don't know which measurement unit will be used in the user's computer and
I can't predict that.

Thank you!
 
J

Jezebel

You can read and set it using application.Options.MeasurementUnit; but you
don't need this for VBA. Internally, most sizes are in points (whatever
units of measurement the user might have selected). Fortunately, VBA
provides the conversion functions also --

Object.Width = MillimetersToPoints(25)

etc
 
J

Jean-Guy Marcil

Amir was telling us:
Amir nous racontait que :
Hi,

Is there anyway I can know in advance what measurement unit is used
internally?
Can I assume it's always point? If it's internally points in my
computer will it be points in my friend's computer?

Lookup all methods in the VBA help file that handle size and position, They
all tell you that they work in points, This is what Jezebel wrote.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
[email protected]
Word MVP site: http://www.word.mvps.org
 
A

Amir

Hi,

Is there anyway I can know in advance what measurement unit is used
internally?
Can I assume it's always point? If it's internally points in my computer
will it be points in my friend's computer?

Thanks,
Amir.
 
Top