Returns a DocumentProperty object by the name of the property.
[Visual Basic]Overrides Overloads Public Default ReadOnly Property Item( _
ByVal
name As
String _
) As
DocumentProperty Parameters
- name
- The case-insensitive name of the property to retrieve.
Remarks
The string names of the properties correspond to the names of the typed properties available from BuiltInDocumentProperties.
If you request a property that is not present in the document, but the name of the property is recognized as a valid built-in name, a new DocumentProperty is created, added to the collection and returned. The newly created property is assigned a default value (empty string, zero, false or DateTime.MinValue depending on the type of the built-in property).
If you request a property that is not present in the document and the name is not recognized as a built-in name, a null is returned.
Example
Retrieves a built-in document property by name.
[C#]
Document doc = new Document(MyDir + "Properties.doc");
DocumentProperty prop = doc.BuiltInDocumentProperties["Keywords"];
Console.WriteLine(prop.ToString());
[Visual Basic]
Dim doc As Document = New Document(MyDir & "Properties.doc")
Dim prop As DocumentProperty = doc.BuiltInDocumentProperties("Keywords")
Console.WriteLine(prop.ToString())See Also
BuiltInDocumentProperties Class | Aspose.Words.Properties Namespace