DocumentProperties (collection)

<< Click to Display Table of Contents >>

DocumentProperties (collection)

Access paths:

Application à Workbooks à Item à DocumentProperties

Application à ActiveWorkbook à DocumentProperties

 1  Description

The DocumentProperties collection contains all document properties of a document. These include, for example, the title, author, number of cells filled with content, 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 Workbook.BuiltInDocumentProperties:

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

pm.ActiveWorkbook.BuiltInDocumentProperties(smoPropertyTitle) = "My calculation"

 

' Show the number of charts in the active document

MsgBox pm.ActiveWorkbook.BuiltInDocumentProperties("Number of charts")

 3  Properties, objects, collections and methods

Properties:

Count R/O

 

Objects:

Item DocumentProperty (default object)

Application Application

Parent Workbook

Count (property, R/O)

Data type: Long

Returns the DocumentProperty objects in the collection, i.e. the number of the currently open documents. This value is immutable, because all PlanMaker 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 ' n/a (not available in PlanMaker)

smoPropertyCharacters            = 11 ' n/a (not available in PlanMaker)

smoPropertyWords                 = 12 ' n/a (not available in PlanMaker)

smoPropertySentences             = 13 ' n/a (not available in PlanMaker)

smoPropertyParas                 = 14 ' n/a (not available in PlanMaker)

smoPropertyChapters              = 15 ' n/a (not available in PlanMaker)

smoPropertySections              = 16 ' n/a (not available in PlanMaker)

smoPropertyLines                 = 17 ' n/a (not available in PlanMaker)

smoPropertyPages                 = 18 ' "Number of pages"

smoPropertyCells                 = 19 ' "Number of cells"

smoPropertyTextCells             = 20 ' "Number of cells with text"

smoPropertyNumericCells          = 21 ' "Number of cells with numbers"

smoPropertyFormulaCells          = 22 ' "Number of cells with formulas"

smoPropertyNotes                 = 23 ' "Number of comments"

smoPropertySheets                = 24 ' "Number of worksheets"

smoPropertyCharts                = 25 ' "Number of charts"

smoPropertyPictures              = 26 ' "Number of pictures"

smoPropertyOLEObjects            = 27 ' "Number of OLE objects"

smoPropertyDrawings              = 28 ' "Number of drawings"

smoPropertyTextFrames            = 29 ' "Number of text frames"

smoPropertyTables                = 30 ' n/a (not available in PlanMaker)

smoPropertyFootnotes             = 31 ' n/a (not available in PlanMaker)

smoPropertyAvgWordLength         = 32 ' n/a (not available in PlanMaker)

smoPropertyAvgCharactersSentence = 33 ' n/a (not available in PlanMaker)

smoPropertyAvgWordsSentence      = 34 ' n/a (not available in PlanMaker)

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

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 Workbook.