Rahul
Rahul

Reputation: 11520

How to give multiple hyperlink to single string

I am of the opinion that giving multiple hyperlink to a single string is not possible in MS word document. I don't have any knowledge of C# but I think after reading How insert multiple hyperlinks to one comment in MS WORD using C#? I just want to clarify weather multiple hyperlink to a single comment is possible or not.

For example I have a "string" I want to give different hyperlinks like this

example.com/s
example.com/t
example.com/r
example.com/i
example.com/n
example.com/g

So that I get change to select where I want to go from that string.

Upvotes: 0

Views: 634

Answers (1)

Cindy Meister
Cindy Meister

Reputation: 25663

In Word, a hyperlink is not a string, it's a field code. Field codes are special objects. It is, therefore, not possible to pass multiple hyperlink objects as part of a string. You can't even pass one hyperlink object as part of a string...

You can pass multiple hyperlink strings as a delimited string, then "split" the string into an array, loop the array to create multiple hyperlink objects.

If you want to open a hyperlink or hyperlinks from code, there is a FollowHyperlink method, as I recall (I'm on a mobile device at the moment, so can't double-check). You can pass a string to that.

Upvotes: 1

Related Questions