Created
February 3, 2022 17:43
-
-
Save jfrmilner/f2137616a30cfe02d5655ce7c977206c to your computer and use it in GitHub Desktop.
AutoHotKey - Hotkey to Accept Outlook Meeting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
;jfrmilner hotkeys | |
;^ = Ctrl, ! = ALT, # = Win, + = Shift | |
;Shift+F7 | |
+f7:: | |
objOL := ComObjActive("Outlook.Application").ActiveExplorer.Selection.Item(1) ; Selected message in Outlook | |
objOLAp := objOL.GetAssociatedAppointment(True) | |
ResponseStatus := objOLAp.ResponseStatus ; Subject ;https://docs.microsoft.com/en-us/office/vba/api/outlook.olresponsestatus | |
objOLAp.Respond(olResponseAccepted := 3) ; 3 = The meeting was accepted. https://docs.microsoft.com/en-us/office/vba/api/outlook.olmeetingresponse | |
objOLAp.Send | |
if (objOLAp.ResponseStatus == 3) { | |
objOL.UnRead := False | |
objOL.Delete | |
} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment