[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ICustomDocumentPropertyCollection.AddLinkToContent

AddLinkToContent Method

AddLinkToContent(string, string)

Creates a new IDocumentProperty that is linked to workbook content and adds it to the custom document properties of the current Workbook.

Declaration
IDocumentProperty AddLinkToContent(string name, string source)
Function AddLinkToContent(name As String, source As String) As IDocumentProperty
Parameters
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.

Returns
Type Description
IDocumentProperty

The new IDocumentProperty.

Examples
worksheet.Range["A1"].Value = "Sales";
workbook.Names.Add("DepartmentCell", "=Sheet1!$A$1");
IDocumentProperty property = workbook.CustomDocumentProperties.AddLinkToContent("Department", "DepartmentCell");
string linkSource = property.LinkSource;