Document Properties Dialog

  • 2 minutes to read

The Document Properties dialog enables end-users to view and modify document metadata accessible with the Document.DocumentProperties and Document.CustomProperties properties.

End-users can invoke this dialog by clicking Document Properties on the Home ribbon tab. Refer to the How to: Create the RichEditControl with a Ribbon UI topic for details on how to provide the Ribbon UI for the RichEditControl. Executing the ShowDocumentPropertiesFormCommand command invokes this dialog as well.

XtraRichEdit_Dialogs_DocumentProperties_Invoke

Before a dialog is shown, the RichEditControl.DocumentPropertiesFormShowing event occurs.

The dialog contains the following tabs:

  1. General
  2. Summary
  3. Statistics
  4. Custom

General

The General tab allows end-users to view properties of the document file.

DocumentPropertiesDialog-General

Summary

The Summary tab allows end-users to edit several built-in document properties.

DocumentPropertiesDialog-Summary

Dialog Field Document Field Document Property
Title TITLE DocumentProperties.Title
Subject SUBJECT DocumentProperties.Subject
Author AUTHOR DocumentProperties.Author
Manager MANAGER DocumentProperties.Manager
Company COMPANY DocumentProperties.Company
Category DOCPROPERTY DocumentProperties.Category
Keywords KEYWORDS DocumentProperties.Keywords
Comments COMMENTS DocumentProperties.Description
Template TEMPLATE DocumentProperties.Template

Statistics

The Statistics tab allows end-users to view certain document properties.

DocumentPropertiesDialog-Statistics

Dialog Field Document Field Document Property
Created CREATEDATE DocumentProperties.Created
Modified SAVEDATE DocumentProperties.Modified
Printed PRINTDATE DocumentProperties.LastPrinted
Last saved by LASTSAVEDBY DocumentProperties.LastModifiedBy
Revision number REVNUM DocumentProperties.Revision

Custom

The Custom tab allows end-users to add and edit custom document properties.

Custom properties are contained in the Document.CustomProperties collection. To insert a custom property value in the document, insert the DOCVARIABLE field and handle the RichEditControl.CalculateDocumentVariable event. In the event handler, obtain a custom property value and assign it to the CalculateDocumentVariableEventArgs.Value property.

DocumentPropertiesDialog-Custom

Dialog Field API
Name A string used to retrieve a property from the Document.CustomProperties collection. The DocumentCustomProperties.Names property enables you to iterate over custom property names in a document.
Type The type of the custom property for display in the dialog. The DocumentCustomProperties.Item property returns the value of a custom property as a System.Object type and you can use the Object.GetType() method to determine its value type.
Value Use the DocumentCustomProperties.Item property to obtain a custom property value.
Link to content When checked, the Value field specifies a name of the bookmark whose content is extracted to set the value of a custom property. Assign a Bookmark object instead of any value to the custom document property using the DocumentCustomProperties.Item member to create a link to bookmark.
Properties A list of all DocumentCustomProperties.