Udostępnij za pośrednictwem


Document.BuiltInDocumentProperties Property (2007 System)

Gets a DocumentProperties collection that represents all the built-in document properties for the document.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property BuiltInDocumentProperties As Object
'Usage
Dim instance As Document 
Dim value As Object 

value = instance.BuiltInDocumentProperties
[BrowsableAttribute(false)]
public Object BuiltInDocumentProperties { get; }
[BrowsableAttribute(false)]
public:
property Object^ BuiltInDocumentProperties {
    Object^ get ();
}
public function get BuiltInDocumentProperties () : Object

Property Value

Type: System.Object
A DocumentProperties collection that represents all the built-in document properties for the document.

Remarks

To return a single DocumentProperty that represents a specific built-in document property, use BuiltInDocumentProperties(index) in Visual Basic or BuiltInDocumentProperties[index] in C#, where index is one of the WdBuiltInProperty values.

If Microsoft Office Word does not define a value for one of the built-in document properties, reading the Value property for that document property throws an exception.

Use the CustomDocumentProperties property to return the collection of custom document properties.

Examples

The following code example displays a message that shows the date and time that the document was created.

This example is for a document-level customization.

Private Sub DocumentBuiltInDocumentProperties()
    MessageBox.Show("Document creation: " & CType(Me.BuiltInDocumentProperties, _
        Office.DocumentProperties)(Word.WdBuiltInProperty.wdPropertyTimeCreated). _
        Value.ToString())
End Sub
private void DocumentBuiltInDocumentProperties()
{
    MessageBox.Show("Document creation: " + ((Office.DocumentProperties)
        (this.BuiltInDocumentProperties))[Word.WdBuiltInProperty.
        wdPropertyTimeCreated].Value.ToString());
}

.NET Framework Security

See Also

Reference

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace