Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Gets a DocumentProperties collection that represents all the custom document properties for the document.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
Syntax
'Declaration
Public ReadOnly Property CustomDocumentProperties As Object
public Object CustomDocumentProperties { get; }
Property Value
Type: System.Object
A DocumentProperties collection that represents all the custom document properties for the document.
Remarks
Use the BuiltInDocumentProperties property to return the collection of built-in document properties.
Properties of type msoPropertyTypeString cannot exceed 255 characters in length.
Examples
The following code example adds a custom document property named Project Name to the document, and sets the value to White Papers. To use this example, run it from the ThisDocument class in a document-level project.
Private Sub DocumentCustomDocumentProperties()
Dim prps As Microsoft.Office.Core.DocumentProperties
prps = CType(Me.CustomDocumentProperties, Office.DocumentProperties)
prps.Add("Project Name", False, Microsoft.Office.Core.MsoDocProperties. _
msoPropertyTypeString, "White Papers")
End Sub
private void DocumentCustomDocumentProperties()
{
Microsoft.Office.Core.DocumentProperties prps;
prps = (Office.DocumentProperties)this.CustomDocumentProperties;
prps.Add("Project Name", false, Microsoft.Office.Core
.MsoDocProperties.msoPropertyTypeString, "White Papers", missing);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.