

However, measurements within the standard application menus are set in centimeters or inches. Measurements in standard menus are in Centimeters This can be seen when setting the position and size of a shape in PowerPoint through the standard menus.
#What are microsoft word default settings code#
MsgText = msgText & "Width: " & & vbNewLine MsgText = msgText & "Height: " & & vbNewLine MsgText = msgText & "Left: " & & vbNewLine Measurements for VBA are in Pointsīelow is the PowerPoint VBA Code to show the dimensions of the active shape: Sub getShapeSizes() Yet, when using a macro to retrieve the position of that same shape, it displays the value in points. Whether the displayed measurements are in centimeters or inches is set through the Control Panel for PowerPoint. For Excel, the default is also set through the Control panel, but this can be changed to be non-default within the Excel options. ValueInches = valuePoints / Application.InchesToPoints(1)ĭebug.Print valueInches Converting from Points to Pixels ValueCentimeters = valuePoints / Application.CentimetersToPoints(1)ĭebug.Print valueCentimeters Convert from Points to Inches Dim valuePoints As Double Dim valueInches As Double ValuePoints = Application.CentimetersToPoints(valueCentimeters)ĭebug.Print valuePoints Convert from Points to Centimeters Dim valuePoints As Double Dim valueCentimeters As Double ValuePoints = Application.InchesToPoints(valueInches)ĭebug.Print valuePoints Convert from Centimeters to Points Dim valueCentimeters As Double Dim valuePoints As Double Microsoft has provided two useful VBA function to make this conversion Convert from Inches to Points Dim valueInches As Double Dim valuePoints As Double File -> Options -> Advanced -> Display -> Ruler Units.Ĭonverting from Inches or Centimeters to PointsĬonverting from inches or centimeters into points is reasonably straightforward, as there are 72 points to an inch or 28.35 points to a centimeter (rounded to 2 decimal places). The number of pixels will depend on a variety of factors, such as screen resolution used for each monitor. What about Pixels? Whilst Pixels may seem to be an understandable unit of measure for the purposes of controlling positions of objects, it’s not as useful as you might expect. Microsoft word default settings centimeters to inches code However, if you are desperate to convert points to pixels the following VBA code could be used.

However, if you are desperate to convert points to pixels the following VBA code could be used.

ValuePixels = (valuePoints)ĭebug.Print "X axis Pixels: " & valuePixels Dim valuePoints As Long Dim valuePixels As Long #Microsoft word default settings centimeters to inches code
#What are microsoft word default settings full#
Note: The user should be a Global Administrator or a SharePoint Administrator, and has Full Control permissions on the site collections. Please run the below PowerShell script as an admin:
