Previous Document Next Document
TextRange.Paragraphs

Property Paragraphs As TextParagraphs

Member of TextRange

The Paragraphs property returns a collection of all of the paragraphs in a range.

The Paragraphs property returns a read-only value.

The following code 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.