Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2005

Tip: Looking for answers? Try searching our database.

Defining and changing the current used measurement unit

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Amir - 09 Jul 2005 07:30 GMT
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!
Jezebel - 09 Jul 2005 08:34 GMT
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

> Hi!
>
[quoted text clipped - 6 lines]
>
> Thank you!
Amir - 09 Jul 2005 16:31 GMT
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.

> 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
[quoted text clipped - 15 lines]
>>
>> Thank you!
Jean-Guy Marcil - 09 Jul 2005 16:39 GMT
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.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Amir - 09 Jul 2005 18:30 GMT
Thank you very much, Jean-Guy!

Kind Regards,
Amir.

> Amir was telling us:
> Amir nous racontait que :
[quoted text clipped - 8 lines]
> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.