[]
Creates a new IDocumentProperty that is linked to workbook content and adds it to the custom document properties of the current Workbook.
IDocumentProperty AddLinkToContent(string name, string source)
Function AddLinkToContent(name As String, source As String) As IDocumentProperty
| Type | Name | Description |
|---|---|---|
| string | name | The name of the new IDocumentProperty. |
| string | source | The workbook defined name, such as a named range, whose referenced content is linked to the property. |
| Type | Description |
|---|---|
| IDocumentProperty | The new IDocumentProperty. |
worksheet.Range["A1"].Value = "Sales";
workbook.Names.Add("DepartmentCell", "=Sheet1!$A$1");
IDocumentProperty property = workbook.CustomDocumentProperties.AddLinkToContent("Department", "DepartmentCell");
string linkSource = property.LinkSource;