Here is an example:
Code: Select all
F12::
olApp := ComObjActive("Outlook.Application")
try
olItem := olApp.ActiveWindow.CurrentItem
catch
olItem := olApp.ActiveExplorer.Selection.Item(1)
if (olItem.Class = 43)
olMailItem := olItem
else
{
MsgBox Mail Item Not Current or Selected
return
}
olReplyAllItem := olMailItem.ReplyAll
olReplyAllItem.Display
return
This is a little more robust than the most basic example. The main point being you need to have an email and then do ReplyAll to it.
This code first checks to see if you currently have an item open, if not if an item is selected. Then it checks to make sure it is an email item and not a contact or some other kind of item. Then does the ReplyAll and Displays it.
Before or after the Display you can do any setting of To:, CC:, Body, Attachments, etc. The same as lots of examples out there about setting properties in a new email.
FG