is there any way to programmaticaly add an hyperlink to the selected text in a MS Word Add-In?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The code below converts selected text into a hyperlink which points to the Microsoft site:
The actual text of the hyperlink,by default, will be your selected text. If you need this text to be of different value, for instance – the actual url address, you can simply change the TextToDisplay property:
I’m not sure exactly how dynamic your logic needs to be but I believe the above example will give you a push in the right direction.