Etudes for Microsoft Word Programmers. Appendix.


Information on this page is from Microsoft MSDN http://msdn.microsoft.com.

Document Properties (Word 2003)

Property Types

Available document property types are listed in the following table.

Type

Description

Text

Text. Length can not exceed 256 symbols. Text can not contain special symbols.

Number

Number. If number can not be saved as integer it is saved as float.

Date

Date. Uses system date format such as "MM/DD/YYYY" or "DD/MM/YYYY".

Yes or No

"YES" or "NO".

Time

Date and time.

Multiline Text

“ext. Could contain some lines and has arbitrary length.

 

Only built-in properties can have types "Time" or "Multiline Text".

Enumeration msoDocProperties

Enumeration msoDocProperties defines types of custom document property.

Constant

Value

msoPropertyTypeBoolean

2

msoPropertyTypeDate

3

msoPropertyTypeFloat

5

msoPropertyTypeNumber

1

msoPropertyTypeString

4

Built-in Document Properties

Available document built-in properties are listed in the following table.

Tab

Property

Type

Description

General

File name

Text

File name

General

Type

Text

File type

General

Location

Text

Folder

General

Size

Number

File size on disk

General

MS-DOS name

Text

Short file name in 8.3 format

General

Created

Time

Time of first save on this computer.

General

Modified

Time

Time of last save.

General

Accessed

Time

Time of last open.

General

Read only

Yes or No

Attribute "read only"

General

Hidden

Yes or No

Attribute "hidden"

General

Archive

Yes or No

Attribute "archive"

General

System

Yes or No

Attribute "system"

Summary

Title

Text

Document title

Summary

Subject

Text

Document Subject

Summary

Author

Text

Author

Summary

Manager

Text

Manager

Summary

Company

Text

Company

Summary

Category

Text

Category

Summary

Keywords

Text

Keywords

Summary

Comments

Multiline Text

Comments

Summary

Hyperlink base

Text

Hyperlink base

Summary

Template

Text

Attached template

Summary

Save preview

Yes or No

Preview

Statistics

Created

Time

File creation time

Statistics

Modified

Time

Last save time

Statistics

Accessed

Time

Last open time

Statistics

Printed

Time

Last print time

Statistics

Last saved by

Text

Last user that saved the document

Statistics

Revision number

Number

Number of saves

Statistics

Total editing time

Number

Total editing time in minutes

Statistics

Pages

Number

Total pages number

Statistics

Paragraphs

Number

Total paragraphs number

Statistics

Lines

Number

Total lines number

Statistics

Words

Number

Total words number

Statistics

Characters

Number

Total characters number (without spaces).

Statistics

Characters (with spaces)

Number

Total characters number (with spaces).

Statistics

Bytes

Number

Total bytes number, including pictures etc.

Contents

Document contents

Multiline Text

Document name. If  "Save preview" is checked, then contents headings are included as well.

 

Editable built-in properties (tab "Summary") are usually used for search.

Built-in document properties are usually used for plug-ins parameters.

Built-in document properties are located in BuiltInDocumentProperties collection and could be accessed by predefined index (enumeration wdBuiltinProperty):

   varProp = Doc.BuiltInDocumentProperties.Item(wdProperty)

Enumeration WdBuiltInProperty

Enumeration WdBuiltInProperty constants are listed in the following table:

Constant

Value

wdPropertyAppName

9

wdPropertyAuthor

3

wdPropertyBytes

22

wdPropertyCategory

18

wdPropertyCharacters

16

wdPropertyCharsWSpaces

30

wdPropertyComments

5

wdPropertyCompany

21

wdPropertyFormat

19

wdPropertyHiddenSlides

27

wdPropertyHyperlinkBase

29

wdPropertyKeywords

4

wdPropertyLastAuthor

7

wdPropertyLines

23

wdPropertyManager

20

wdPropertyMMClips

28

wdPropertyNotes

26

wdPropertyPages

14

wdPropertyParas

24

wdPropertyRevision

8

wdPropertySecurity

17

wdPropertySlides

25

wdPropertySubject

2

wdPropertyTemplate

6

wdPropertyTimeCreated

11

wdPropertyTimeLastPrinted

10

wdPropertyTimeLastSaved

12

wdPropertyTitle

1

wdPropertyVBATotalEdit

13

wdPropertyWords

15

RTF Document Format

Built-in document properties are saved not only in .DOC, but in .RTF format as well.

Here is an example of lines in RTF format (just load RTF file to the Notepad):

{\*\userprops
{\propname MyPropBool}\proptype11{\staticval 1}
{\propname MyPropNumber}\proptype3{\staticval 102}
{\propname MyPropString}\proptype30{\staticval 123}
{\propname MyPropDate}\proptype64{\staticval 12/1/2005}
}

Dialog "Document Properties" (Microsoft Word)

To view and edit document properties open the document in Microsoft Word and select menu item "File\Properties". Dialog "Document Properties" consists of some tabs.

Tab "General"

Tab "General" displays non-editable document properties and looks like this:

Tab "Summary"

Tab "Summary" displays editable document properties and looks like this:

Tab "Statistics"

Tab "Statistics" displays non-editable document properties and looks like this:

"Bytes" property is not always displayed.

Tab "Contents"

Tab "Contents" displays document title (if "Save preview" is checked document headings are displayed as well) and looks like this:

Tab "Custom"

Tab "Custom" displays custom (user-defined) document properties and allow editing.
Tab "Custom" looks like this:

If user enters invalid or not properly formatted value to the "Value" control, then after confirmation this value is saved as custom property of text type.

Dialog "Document Properties" (Windows)

To view or edit document properties in Windows select "Properties" item in the Explorer context menu (use right mouse button). For opened document tabs "Custom" and "Summary" are not displayed.

The "Document Properties" Windows dialog contains tabs "General", "Security", "Custom" and "Summary". Tabs "General", "Security" are common to any file types and are out of interest here.

Tab "Custom"

Tab "Custom" displays list of the custom document properties and allow editing them.
Tab "Custom" looks like this:

Tab "Summary"

Tab "Summary" displays editable document properties and looks like this.

If "Advanced" button is pressed tab "Summary" looks like this:

Note different icon types for editable and non-editable properties. To edit property value double click in the column "Value".


Etudes for Microsoft Word Programmers. Appendix. Document Properties.


Unless otherwise noted, all materials on this site are
© 2000-2009 Evgeny Akhundzhanov, All Rights Reserved Worldwide
Microsoft is in no way affiliated with, nor offers endorsement of, this site.
www.transcriber.ru | E-mail the Author