0

I am using windows 10 on my pc and use chrome most of the time for outlook. I am trying to get a script that automatically opens a link received in a email. I have found vba scripts but they do not work i keep getting errors. If any of you could help me out with this?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343

1 Answers1

0

You can use the HTMLBody property of the MailItem class to find all hyperlinks there. Then you can use the following method to run Chrome with a link found:

Sub LaunchInChrome (url as String)
  Dim chromePath As String
  chromePath = """C:\Program Files\Google\Chrome\Application\chrome.exe"""
  Shell (chromePath & " -url " & url)
End Sub
Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45