CustomDocumentProperties Class |
Namespace: Aspose.Words.Properties
The CustomDocumentProperties type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | Count |
Gets number of items in the collection.
(Inherited from DocumentPropertyCollection.) |
![]() ![]() | ItemInt32 |
Returns a DocumentProperty object by index.
(Inherited from DocumentPropertyCollection.) |
![]() ![]() | ItemString |
Returns a DocumentProperty object by the name of the property.
(Inherited from DocumentPropertyCollection.) |
Name | Description | |
---|---|---|
![]() ![]() | Add(String, Boolean) |
Creates a new custom document property of the PropertyType.Boolean data type.
|
![]() ![]() | Add(String, DateTime) |
Creates a new custom document property of the PropertyType.DateTime data type.
|
![]() ![]() | Add(String, Double) |
Creates a new custom document property of the PropertyType.Float data type.
|
![]() ![]() | Add(String, Int32) |
Creates a new custom document property of the PropertyType.Number data type.
|
![]() ![]() | Add(String, String) |
Creates a new custom document property of the PropertyType.String data type.
|
![]() ![]() | AddLinkToContent |
Creates a new linked to content custom document property.
|
![]() ![]() | Clear |
Removes all properties from the collection.
(Inherited from DocumentPropertyCollection.) |
![]() ![]() | Contains |
Returns true if a property with the specified name exists in the collection.
(Inherited from DocumentPropertyCollection.) |
![]() | Equals | (Inherited from Object.) |
![]() ![]() | GetEnumerator |
Returns an enumerator object that can be used to iterate over all items in the collection.
(Inherited from DocumentPropertyCollection.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() ![]() | IndexOf |
Gets the index of a property by name.
(Inherited from DocumentPropertyCollection.) |
![]() ![]() | Remove |
Removes a property with the specified name from the collection.
(Inherited from DocumentPropertyCollection.) |
![]() ![]() | RemoveAt |
Removes a property at the specified index.
(Inherited from DocumentPropertyCollection.) |
![]() | ToString | (Inherited from Object.) |
Each DocumentProperty object represents a custom property of a container document.
The names of the properties are case-insensitive.
The properties in the collection are sorted alphabetically by name.
Document doc = new Document(MyDir + "Properties.docx"); Console.WriteLine("1. Document name: {0}", doc.OriginalFileName); Console.WriteLine("2. Built-in Properties"); foreach (DocumentProperty docProperty in doc.BuiltInDocumentProperties) Console.WriteLine("{0} : {1}", docProperty.Name, docProperty.Value); Console.WriteLine("3. Custom Properties"); foreach (DocumentProperty docProperty in doc.CustomDocumentProperties) Console.WriteLine("{0} : {1}", docProperty.Name, docProperty.Value);