COM defines a standard common property set for storing summary information about documents. The Summary Information property set must be stored in an IStream instance off of the root storage object; it is not valid to store the property set in the "Contents" stream of a named IStorage instance.
For example, to create an ANSI simple property set, you would call IPropertySetStorage::Create to create the property set, specifying PROPSETFLAG_ANSI (simple is the default mode), then write to it with a call to IPropertyStorage::WriteMultiple. To read the property set, you would call IPropertyStorage::ReadMultiple.
All shared property sets are identified by a stream or storage name with the prefix "\005" (or 0x05) to show it is a property set shareable among applications, and the Summary Information property set is no exception. The name of the stream that contains the Summary Information property set is:
"\005SummaryInformation"
The FMTID for the Summary Information property set is:
F29F85E0-4FF9-1068-AB91-08002B27B3D9
Use the DEFINE_GUID macro to define the FMTID for the property set:
DEFINE_GUID(FormatID_SummaryInformation, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9);
On an Intel byte-ordered machine, the FMTID has the following representation:
E0 85 9F F2 F9 4F 68 10 AB 91 08 00 2B 27 B3 D9
The following table shows the string property names for the Summary Information property set, along with the respective property identifiers and VT type indicators.
Property Name | Property ID String | Property ID | VT Type |
---|---|---|---|
Title | PID_TITLE | 0x00000002 | VT_LPSTR |
Subject | PID_SUBJECT | 0x00000003 | VT_LPSTR |
Author | PID_AUTHOR | 0x00000004 | VT_LPSTR |
Keywords | PID_KEYWORDS | 0x00000005 | VT_LPSTR |
Comments | PID_COMMENTS | 0x00000006 | VT_LPSTR |
Template | PID_TEMPLATE | 0x00000007 | VT_LPSTR |
Last Saved By | PID_LASTAUTHOR | 0x00000008 | VT_LPSTR |
Revision Number | PID_REVNUMBER | 0x00000009 | VT_LPSTR |
Total Editing Time | PID_EDITTIME | 0x0000000A | VT_FILETIME (UTC) |
Last Printed | PID_LASTPRINTED | 0x0000000B | VT_FILETIME (UTC) |
Create Time/Date (*) | PID_CREATE_DTM | 0x0000000C | VT_FILETIME (UTC) |
Last saved Time/Date (*) | PID_LASTSAVE_DTM | 0x0000000D | VT_FILETIME (UTC) |
Number of Pages Number of Words Number of Characters |
PID_PAGECOUNT PID_WORDCOUNT PID_CHARCOUNT |
0x0000000E 0x0000000F 0x00000010 |
VT_I4 VT_I4 VT_I4 |
Thumbnail | PID_THUMBNAIL | 0x00000011 | VT_CF |
Name of Creating Application | PID_APPNAME | 0x00000012 | VT_LPSTR |
Security | PID_SECURITY | 0x00000013 | VT_I4 |
* Some methods of file transfer (such as a download from a BBS) do not maintain the file system's version of this information correctly. |