html - How to insert a clickable hyperlink with Outlook AddIn? -
i working on outlook addin pastes text in body of email. not using of following.
email.body email.htmlbody instead, use: email.getinspector.wordeditor.content.insertbefore()or insertafter() reason of choice justified fact latter mentioned line of code keeps email formatting, default user's fonts, signature formatting.
now, when try paste link email, doesn't appear hyperlink, string. link becomes clickable hyperlink when click space or enter after it. can't use uri class because pasting text in string format along link.
i tried add tags myself , saved email .htm here line link posted. tags not translated html.
<a href="http://whatever.com">http://whatever.com</a> and if don't put tags myself, it's same thing, without ", >, <... , of course no html tag, makes no clickable hyperlink.
anyone knows how fix ?
the document class word object model provides hyperlinks property returns hyperlinks collection represents hyperlinks in specified document.
you need use add method of hyperlinks class. returns hyperlink object represents new hyperlink added range, selection, or document.
Comments
Post a Comment