LustyLew World Chat Champion
Joined: 19 Apr 2004 Karma :
|
Posted: 17:50 - 08 Jan 2019 Post subject: Random VBA Question |
|
|
Anyone a VB whiz who might be able to help?
I have created a ribbon button in Outlook 2016 which opens a URL to the users spam filter. currently this opens the default browser (IE 11) in a maximized view.
We use Enterprise Vault as an email archiving tool, if you hit the search button on the EV ribbon, it opens a web based browser embedded into Outlook itself. It opens where you'd expected to see email items and the preview pane.
I am a complete novice to VB, but it would be nice to have the Quarantine button behave in a similar way.
Here's the code I've used:
Option Explicit
Private Declare Function ShellExecute _
Lib "shell32.dll" Alias "ShellExecuteA" ( _
ByVal hWnd As Long, _
ByVal Operation As String, _
ByVal Filename As String, _
Optional ByVal Parameters As String, _
Optional ByVal Directory As String, _
Optional ByVal WindowStyle As Long = vbMaximizedFocus _
) As Long
Public Sub OpenQuarantine()
Dim lSuccess As Long
lSuccess = ShellExecute(0, "Open", "https://protection.office.com/#/quarantine")
End Sub
Cheers! |
|