This class contains all file properties that are used by Word and Windows Explorer to display and store metadata about documents. None of these properties will affect the content of a document.

 public sealed class DocumentProperties
Public NotInheritable Class DocumentProperties

You cannot create a DocumentProperties object using the new keyword. You must get an existing DocumentProperties object from a Document.

MS Word equivalent: File menu > Properties

The following sample gets the DocumentProperties of a document so you can start working with these properties.


          WordApplication app = new WordApplication();
          Document doc = app.Create();
          DocumentProperties docProps = doc.DocumentProperties;
        

          Dim app As New WordApplication()
          Dim doc As Document = app.Create()
          Dim docProps As DocumentProperties = doc.DocumentProperties
        

Name

Description

Application

Author

Comments

Company

CreationDate

Keywords

LastSavedDate

Manager

Subject

Title

Name

Description

Clear()

GetCustomProperty(String)

GetProperty(DocumentProperties.BuiltInProperty)

GetProperty(String)

RestoreDefaults()

SetCustomProperty(String, Object)

SetProperty(DocumentProperties.BuiltInProperty, Object)

SetProperty(String, Object)

Name

Description

BuiltInProperty