Previous Document Next Document

Object Model Reference : Classes : T : TextRange : Properties : TextRange.Paragraphs


TextRange.Paragraphs

Property Paragraphs As TextParagraphs

Description

Member of TextRange

The Paragraphs property returns all the paragraphs in a text range.

The Paragraphs property returns a read-only value.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.