Open the link in the email in outlook - Microsoft Community
- Get link
- X
- Other Apps
hi,
when click link in mail in outlook , open webpage in internet browser default. wonder if possible open webpage in outlook directly, not jump google chrome.
any ideas? thanks
hi,
maybe can achieved vba. here macro can try:
public sub openhyperlinkswithinoutlook() dim objmail outlook.mailitem dim objworddocument word.document dim objhyperlinks word.hyperlinks dim long dim objhyperlink word.hyperlink dim strhyperlinklist string dim strnumber string dim strurl string dim objexplorer explorer dim objwebbrowser object dim nalert integer on error resume next select case typename(outlook.application.activewindow) case "inspector" set objmail = activeinspector.currentitem case "explorer" set objmail = activeexplorer.selection.item(1) end select set objworddocument = objmail.getinspector.wordeditor set objhyperlinks = objworddocument.hyperlinks if objhyperlinks.count < 1 nalert = msgbox("there no hyperlink in email!", vbexclamation) 'get url of hyperlink elseif objhyperlinks.count = 1 set objhyperlink = objworddocument.hyperlinks.item(1) strurl = objhyperlink.address 'select hyperlink open elseif objhyperlinks.count > 1 = 1 objhyperlinks.count strhyperlinklist = strhyperlinklist & & ": " & objhyperlinks.item(i).address & vbcrlf next = 1 objhyperlinks.count strnumber = inputbox("you have " & objhyperlinks.count & " hyperlinks in email follows. " & vbcrlf & vbcrlf & "please enter number select 1 opened within outlook (format: 1)." & vbcrlf & vbcrlf & strhyperlinklist, "select hyperlink") set objhyperlink = objworddocument.hyperlinks.item(strnumber) strurl = objhyperlink.address exit next end if 'open selected hyperlink set objexplorer = application.activeexplorer set objwebbrowser = objexplorer.commandbars.findcontrol(, 1740) objwebbrowser.text = strurl objwebbrowser.execute end sub
for more detailed information, can see
https://www.datanumen.com/blogs/open-hyperlink-outlook-directly-instead-new-browser-window/
good luck
Office / Outlook / Windows other / Office 2010
- Get link
- X
- Other Apps
Comments
Post a Comment