DocumentProperties (collection)

<< Click to Display Table of Contents >>

DocumentProperties (collection)

Access paths:

Application à Documents à Item à DocumentProperties

Application à ActiveDocument à DocumentProperties

 1  Description

The DocumentProperties collection contains all document properties of a document. This includes the title, the author, the number of words, etc.

The individual elements of this collection are of the type DocumentProperty.

 2  Access to the collection

Each open document has exactly one DocumentProperties collection. It is accessed through Document.BuiltInDocumentProperties:

' Set the title of the active document to "My Story"

tm.ActiveDocument.BuiltInDocumentProperties(smoPropertyTitle) = "My story"

 

' Show the number of words of the active document

MsgBox tm.ActiveDocument.BuiltInDocumentProperties("Number of words")

 3  Properties, objects, collections and methods

Properties:

Count R/O

 

Objects:

Item DocumentProperty (default object)

Application Application

Parent Document

Count (property, R/O)

Data type: Long

Returns the number of DocumentProperty objects in the collection, i.e. the number of document properties of a document. This value is immutable, because all TextMaker documents have the same number of document properties.

Item (pointer to object)

Data type: Object

Returns an individual DocumentProperty object, i.e. an individual document property.

Which DocumentProperty object you get depends on the parameter that you pass to Item. You can specify either the numeric index or the name of the desired document property.

The following table contains the possible numeric values and the names associated to them:

smoPropertyTitle                 =  1 ' "Title"

smoPropertySubject               =  2 ' "Subject"

smoPropertyAuthor                =  3 ' "Author"

smoPropertyKeywords              =  4 ' "Keywords"

smoPropertyComments              =  5 ' "Comments"

smoPropertyAppName               =  6 ' "Application name"

smoPropertyTimeLastPrinted       =  7 ' "Last print date"

smoPropertyTimeCreated           =  8 ' "Creation date"

smoPropertyTimeLastSaved         =  9 ' "Last save time"

smoPropertyKeystrokes            = 10 ' "Number of keystrokes"

smoPropertyCharacters            = 11 ' "Number of characters"

smoPropertyWords                 = 12 ' "Number of words"

smoPropertySentences             = 13 ' "Number of sentences"

smoPropertyParas                 = 14 ' "Number of paragraphs"

smoPropertyChapters              = 15 ' "Number of chapters"

smoPropertySections              = 16 ' "Number of sections"

smoPropertyLines                 = 17 ' "Number of lines"

smoPropertyPages                 = 18 ' "Number of pages"

smoPropertyCells                 = 19 ' n/a (not available in TextMaker)

smoPropertyTextCells             = 20 ' n/a (not available in TextMaker)

smoPropertyNumericCells          = 21 ' n/a (not available in TextMaker)

smoPropertyFormulaCells          = 22 ' n/a (not available in TextMaker)

smoPropertyNotes                 = 23 ' n/a (not available in TextMaker)

smoPropertySheets                = 24 ' n/a (not available in TextMaker)

smoPropertyCharts                = 25 ' n/a (not available in TextMaker)

smoPropertyPictures              = 26 ' "Number of pictures"

smoPropertyOLEObjects            = 27 ' n/a (not available in TextMaker)

smoPropertyDrawings              = 28 ' n/a (not available in TextMaker)

smoPropertyTextFrames            = 29 ' "Number of text frames"

smoPropertyTables                = 30 ' "Number of tables"

smoPropertyFootnotes             = 31 ' "Number of footnotes"

smoPropertyAvgWordLength         = 32 ' "Average word length"

smoPropertyAvgCharactersSentence = 33 ' "Average characters per sentence"

smoPropertyAvgWordsSentence      = 34 ' "Average words per sentence"

This list specifies all document properties that exist in SoftMaker Office, including those that are not available in TextMaker. The latter are marked as "not available in TextMaker".

Application (pointer to object)

Data type: Object

Returns the Application object.

Parent (pointer to object)

Data type: Object

Returns the parent object, i.e. an object of the type Document.