The cAlign parameter can contain the following values or represented by the constants :

Constant ValueDescription

prLeft 0 Left alignment

prRight 1 Right alignment

prCenter 2 Center alignment

Remarks:

The text specified by strText is displayed using the specified point vXpos and vYpos as a reference position. If the vXpos or vYpos parameter is missing, then the value of CurrentX or CurrentY is used.

In case of use of prLeft (the default value), the text is set to the right of this point.

In case of use of prRight, the text is set to the left of this point.

In case of use of pcCenter, the point specifies the midpoint where the text is to be centered.

After the call to AddTextAt the value of CurrentY is advanced for the convenience of previewing several lines of text as a block. CurrentX remains unchanged after the completion of this method.

The parameter strText can be omitted in which case the effect is to advance CurrentY to create a blank line like vbLf.

The variants vXpos and vYpos can not contain boolean values.

If the paper-orientation is set to landscape, and the textline is longer than paperwidth this textline will not be printed, however in portrait setting the textline will be printed and will run over the right margin.

Preview.AddTextAt "Here is a line to be displayed", 1000, 2000
Preview.AddTextAt "Here is a line to be displayed", "1.5 in", "2 in"
Preview.AddTextAt' a blank linePreview.AddTextAt "Here is a line to be displayed", "1.5 cm", "2 cm"