Type Default Value Read Only Description

[Visual Basic]
DirectionType.Default No The default text direction




This property specifies the default primary text direction.

The DirectionType enumeration may take the following values:

  • Default - left-to-right reading direction
  • LeftToRight - left-to-right reading direction (e.g. English)
  • RightToLeft - right-to-left reading direction (e.g. Hebrew).

If a run of English (left-to-right) text is followed by a run of Hebrew (right-to-left) text, LeftToRight gives English text on the left and Hebrew text on the right, whereas RightToLeft gives English text on the right and Hebrew text on the left. In any case, the English text is still left-to-right, and the Hebrew text is still right-to-left.

To support Arabic contextual ligatures (glyph shaping) and right-to-left text, LeftToRight or RightToLeft must be specified at least once somewhere. It can be in this property or in the dir attribute of StyleRun (for Doc.AddTextStyled). If only Default is specified, there will be no contextual ligature support and right-to-left text may appear incorrect.