Previous Document Next Document

Object Model Reference : Classes : T : Text : Methods : Text.ExportToFile


Text.ExportToFile

Sub ExportToFile(FileName As String, StartIndex As Long, Count As Long, [IndexingType As cdrTextIndexingType = cdrCharacterIndexing])

Description

Member of Text

The ExportToFile method saves a portion of a text object to a text file.

Parameter
Description
FileName
Specifies the full path and filename of the file
StartIndex
Specifies the first text object in the text range
Count
Specifies the number of items in the text range
IndexingType
Specifies the type of text to be indexed, and returns a value of cdrTextIndexingType. The indexing type can be character, word, or paragraph. This parameter is optional, and its default value is cdrCharacterIndexing (0).

VBA example

The following VBA example saves the second-to-fifth paragraphs to a text file, and it then inserts that text at the beginning of the text object.

Sub Test()
 ActiveShape.Text.ExportToFile "C:\Temp.txt", 2, 4, cdrParagraphIndexing
 ActiveShape.Text.ImportFromFile "C:\Temp.txt", 1, cdrParagraphIndexing
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.