re-post: custom button in custom toolbar
Eric Legault [MVP - Outlook] wrote:
Paste this code into the top of a new module in the Outlook VBA editor:
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String _
, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal
nShowCmd As Long) As Long
Public Const conSwNormal = 1
Sub RunSavedSearch()
ShellExecute 0, "open", "C:\Temp\test.oss", vbNullString, "", conSwNormal
End Sub
This will run the saved search file called "test.oss" in your C:\Temp
folder. Then map the RunSavedSearch macro to your custom toolbar button via
the Customize dialog (click Macros in the Categories list of the Commands tab
to see your macros).
Eric, let me as u this: is it possible to add to or modify the code so
that it will extract the line that is in the subject of whatever email
is selected in whatever folder, e.g. Inbox or Sent, etc.?
|