[]
Creates a new IDocumentProperty with a string value and adds it to the custom document properties available for the current Workbook.
IDocumentProperty Add(string name, string value)
Function Add(name As String, value As String) As IDocumentProperty
| Type | Name | Description |
|---|---|---|
| string | name | The name of the new IDocumentProperty. |
| string | value | The string value of the property. |
| Type | Description |
|---|---|
| IDocumentProperty | The new IDocumentProperty. |
IDocumentProperty property = workbook.CustomDocumentProperties.Add("Department", "Sales");
Creates a new custom document property with an integer value and adds it to the current Workbook.
IDocumentProperty Add(string name, int value)
Function Add(name As String, value As Integer) As IDocumentProperty
| Type | Name | Description |
|---|---|---|
| string | name | The name of the new IDocumentProperty. |
| int | value | The integer value of the property. |
| Type | Description |
|---|---|
| IDocumentProperty | The new IDocumentProperty. |
IDocumentProperty property = workbook.CustomDocumentProperties.Add("Revision", 3);
object value = property.Value;
Creates a new IDocumentProperty with a date and time value and adds it to the custom document properties available for the current Workbook.
IDocumentProperty Add(string name, DateTime value)
Function Add(name As String, value As Date) As IDocumentProperty
| Type | Name | Description |
|---|---|---|
| string | name | The name of the new IDocumentProperty. |
| DateTime | value | The date and time value of the property. |
| Type | Description |
|---|---|
| IDocumentProperty | The new IDocumentProperty. |
IDocumentProperty property = workbook.CustomDocumentProperties.Add("PublishedOn", new DateTime(2024, 3, 15, 10, 30, 0));
PropertyType type = property.Type;
Creates a new IDocumentProperty with a Boolean value and adds it to the custom document properties available for the current Workbook.
IDocumentProperty Add(string name, bool value)
Function Add(name As String, value As Boolean) As IDocumentProperty
| Type | Name | Description |
|---|---|---|
| string | name | The name of the new IDocumentProperty. |
| bool | value | The Boolean value of the property. |
| Type | Description |
|---|---|
| IDocumentProperty | The new IDocumentProperty. |
IDocumentProperty property = workbook.CustomDocumentProperties.Add("IsReviewed", true);
Creates a new IDocumentProperty with a double-precision floating-point value and adds it to the custom document properties of the current Workbook.
IDocumentProperty Add(string name, double value)
Function Add(name As String, value As Double) As IDocumentProperty
| Type | Name | Description |
|---|---|---|
| string | name | The new IDocumentProperty name. |
| double | value | The double value of the property. |
| Type | Description |
|---|---|
| IDocumentProperty | The new IDocumentProperty. |
IDocumentProperty property = workbook.CustomDocumentProperties.Add("Price", 19.95);
PropertyType type = property.Type;