Table of contents
TOC
Collapse the table of content
Expand the table of content

Application.TwipsToPoints Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Converts a measurement from twips to points (20 twips = 1 point). Returns the converted measurement as a Single.

Syntax

expression. TwipsToPoints( Value)

_expression_A variable that represents an Application object.

Parameters

NameRequired/OptionalData TypeDescription
ValueRequiredSingleThe twip value to be converted to points.

Return Value

Single

Remarks

Use the PointsToTwips method to convert measurements in points to twips.

Example

This example converts measurements in twips entered by the user to measurements in points.

Dim strInput As String 
Dim strOutput As String 

Do While True 
 ' Get input from user. 
 strInput = InputBox( _ 
 Prompt:="Enter measurement in twips (0 to cancel): ", _ 
 Default:="0") 

 ' Exit the loop if user enters zero. 
 If Val(strInput) = 0 Then Exit Do 

 ' Evaluate and display result. 
 strOutput = Trim(strInput) &; " twips = " _ 
 &; Format(Application _ 
 .TwipsToPoints(Value:=Val(strInput)), _ 
 "0.00") &; " points" 

 MsgBox strOutput 
Loop 

See also

Concepts

Application Object

© 2018 Microsoft