This topic has not yet been rated - Rate this topic

Application.PointsToLines Method (Word)

Published: July 16, 2012

Converts a measurement from points to lines (1 line = 12 points). Returns the converted measurement as a Single.

expression .PointsToLines(Points)

expression A variable that represents an Application object. Optional.

Parameters

Name

Required/Optional

Data Type

Description

Points

Required

Single

The measurement, in points.

Return Value

Single

This example converts the line spacing value of the first paragraph in the selection from points to lines.

MsgBox PointsToLines(Selection.Paragraphs(1).LineSpacing) _ 
 & " lines"

This example converts the value of the variable sngData (a measurement in points) to centimeters, inches, lines, millimeters, or picas, depending on the value of the variable intUnit (a value from 1 through 5 that indicates the resulting unit of measurement).

Function ConvertPoints(ByVal intUnit As Integer, _ 
 sngData As Single) As Single 
 
 Select Case intUnit 
 Case 1 
 ConvertPoints = PointsToCentimeters(sngData) 
 Case 2 
 ConvertPoints = PointsToInches(sngData) 
 Case 3 
 ConvertPoints = PointsToLines(sngData) 
 Case 4 
 ConvertPoints = PointsToMillimeters(sngData) 
 Case 5 
 ConvertPoints = PointsToPicas(sngData) 
 Case Else 
 Error 5 
 End Select 
 
End Function

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.