问题
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?
回答1:
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
来源:https://stackoverflow.com/questions/48638504/outlook-script-that-automatically-opens-links-in-emails