Last active
April 26, 2021 15:48
-
-
Save JoeGlines/86a6035f34ee6011869b96db73e576e2 to your computer and use it in GitHub Desktop.
Various properties you can get from an Active Outlook email
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
;******************************************************* | |
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY | |
; Right now you can get a coupon code here: https://the-Automator.com/Learn | |
;******************************************************* | |
#SingleInstance,Force | |
;~ https://docs.microsoft.com/en-us/office/vba/api/outlook.mailitem.actions | |
email:=ComObjActive("Outlook.Application").ActiveWindow.CurrentItem | |
;~ msgbox % email.senderName | |
;~ MsgBox % email.subject | |
;~ MsgBox % email.to | |
;~ MsgBox % email.sentOn | |
;~ MsgBox % email.Recipients | |
;~ MsgBox % email.BodyFormat ;2 is html | |
;~ MsgBox % email.body | |
;~ MsgBox % email.RTFbody | |
;~ MsgBox % email.htmlbody | |
HTML:= email.htmlbody | |
doc := ComObjCreate("HTMLfile") | |
doc.write(html) | |
text:=doc.documentElement.innerText ;gets all text from the DOM | |
MsgBox % text | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment