DocumentPropertyLinkSource Property

Gets the source of a linked custom document property.

Namespace:  Aspose.Words.Properties
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public string LinkSource { get; }

Property Value

Type: String
Examples
Shows how to add linked custom document property.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.StartBookmark("MyBookmark");
builder.Writeln("Text inside a bookmark.");
builder.EndBookmark("MyBookmark");

// Add linked to content property
CustomDocumentProperties customProperties = doc.CustomDocumentProperties;
DocumentProperty customProperty = customProperties.AddLinkToContent("Bookmark", "MyBookmark");

// Check whether the property is linked to content
Assert.AreEqual(true, customProperty.IsLinkToContent);
// Get the source of the property
Assert.AreEqual("MyBookmark", customProperty.LinkSource);
// Get the value of the property
Assert.AreEqual("Text inside a bookmark.\r", customProperty.Value);

doc.Save(ArtifactsDir + "Properties.LinkCustomDocumentPropertiesToBookmark.docx");
See Also