In the Inserts a hyperlink referencing local bookmark example, we have hard coded the Bookmark name as “Bookmark1” and Tip text as “Hyperlink Tip” as below.
builder.StartBookmark("Bookmark1");
builder.Write("Bookmarked text.");
builder.EndBookmark("Bookmark1");
// Insert hyperlink.
// Switch \o is used to provide hyperlink tip text.
builder.InsertHyperlink("Hyperlink Text", @"Bookmark1"" \o ""Hyperlink Tip", true);
In my application, I need to pass the bookmark name and tip text dynamically. Then what is the string format for the second perameter in the InsertHyperlink function? Please find the attachment for code and error screen shots
builder.InsertHyperlink(HyperlinkName, @"Bookmark1"" \o ""Hyperlink Tip", true);
If I pass the second peram as below,
builder.InsertHyperlink(HyperlinkName, bookmarkName + @" \o " + bookmarkTip, true);
then the tip text is like full filepath#Country o Sales Data instead of Sales Data where Country is the bookmarkName.