Options.MeasurementUnit property (Publisher)

Returns or sets a PbUnitType constant representing the standard measurement unit for Microsoft Publisher. Read/write.

Syntax

expression.MeasurementUnit

expression A variable that represents an Options object.

Return value

PbUnitType

Remarks

The MeasurementUnit property value can be one of these PbUnitType constants declared in the Publisher type library:

  • pbUnitCM sets the unit of measurement to centimeters.
  • pbUnitInch sets the unit of measurement to inches.
  • pbUnitPica sets the unit of measurement to picas.
  • pbUnitPoint sets the unit of measurement to points.

All other measurement unit constants don't apply to this property; if used, they return an error.

Example

This example sets the standard measurement unit for Publisher to points.

Sub SetUnitOfMeasurement() 
 Options.MeasurementUnit = pbUnitPoint 
End Sub

This example displays the current unit of measurement.

Sub GetUnitOfMeasurement() 
 Dim measUnit As PbUnitType 
 Dim strUnit As String 
 
 measUnit = Options.MeasurementUnit 
 
 Select Case measUnit 
 Case 0 
 strUnit = "inches" 
 Case 1 
 strUnit = "centimeters" 
 Case 2 
 strUnit = "picas" 
 Case 3 
 strUnit = "points" 
 End Select 
 
 MsgBox "The current unit of measurement is " & strUnit 
 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.