Object Model Reference : Classes : T : TextRange : Properties : TextRange.Paragraphs |
Property Paragraphs As TextParagraphs
Member of TextRange
The Paragraphs property returns all the paragraphs in a text range.
The Paragraphs property returns a read-only value.
The following VBA example applies bold formatting and underlining to the third paragraph.
Sub Test() |
Dim t As Text |
Dim s As Shape |
Dim d As Document |
Dim strText As String |
strText = "This is a paragraph. " & vbCr & _ |
"This is a paragraph. " & vbCr & _ |
"This is a paragraph. " & vbCr & _ |
"This is a paragraph. " & vbCr & _ |
"This is a paragraph." |
Set d = CreateDocument |
Set s = d.ActiveLayer.CreateParagraphText(2, 2, 8, 8, strText) |
Set t = s.Text |
t.Story.Paragraphs.Item(3).Bold = True |
t.Story.Paragraphs.Item(3).Underline = cdrDoubleThinFontLine |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.