UseCharBasedFirstLineIndent Property

Microsoft Publisher Visual Basic

Show All Show All

UseCharBasedFirstLineIndent Property

Returns or sets an MsoTriState constant that specifies whether a paragraph is indented using East Asian character width. Read/write.

MSOTriState can be one of these MSOTriState constants.
msoCTrue
msoFalse
msoTriStateMixed
msoTriStateToggle
msoTrue

expression.UseCharBasedFirstLineIndent

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

The value of UseCharBasedFirstLineIndent can be set only if East Asian languages are enabled on the client computer, whereas the value can be returned regardless of whether East Asian languages are enabled. Note that UseCharBasedFirstLineIndent must be set before the CharBasedFirstLineIndent property can be returned or set. A run-time "permission denied" error is returned if UseCharBasedFirstLineIndent is not set first.

If UseCharBasedFirstLineIndent is True, the paragraph is indented using East Asian character width, and if it is False it is not. The default value is False.

Example

The following example creates a text box on the fourth page of the active publication. After the UseCharBasedFirstLineIndent property is set to True, the width of the first line indent is set to 15 points by using the CharBasedFirstLineIndent property. Font properties are then set, and text is inserted into the paragraph.

Dim theTextBox As Shape

Set theTextBox = ActiveDocument.Pages(4).Shapes _
        .AddShape(msoShapeRectangle, 100, 100, 300, 200)
        
With theTextBox
    .TextFrame.TextRange.ParagraphFormat _
        .UseCharBasedFirstLineIndent = msoTrue
    .TextFrame.TextRange.ParagraphFormat _
        .CharBasedFirstLineIndent = 15
    .TextFrame.TextRange.Font.Name = "Verdana"
    .TextFrame.TextRange.Font.Size = 12
    .TextFrame.TextRange.Text = "This is a test sentence." _
        & Chr(13) & "This is another test sentence."
End With