Created
March 29, 2021 11:19
-
-
Save JoeGlines/4f8d693a6991c17051bdedc04f261ae6 to your computer and use it in GitHub Desktop.
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
mail := ComObjActive("Outlook.Application").GetNameSpace("MAPI").GetDefaultFolder[6] ; Access the Session NameSpace | |
;~ mail := ComObjActive("Outlook.Application").GetNameSpace("MAPI").GetDefaultFolder[0] ; Access the Session NameSpace | |
myDestFolder := mail.Folders("CCY") | |
numb := myDestFolder.Items.Count | |
MsgBox % numb | |
Loop % mail.Items.Count | |
{ | |
; if Instr(mail.Items[A_Index].SenderName,"JoeTazz") { | |
if Instr(mail.Items[A_Index].Subject,"commented on") { | |
Item := mail.Items(A_Index) | |
My .= A_Index "," | |
} | |
} | |
StringTrimRight, My, My, 1 ; remove final `n | |
Sort, My , N, R, D, ; Numeric sort | |
; MsgBox % My | |
Loop, parse, My, `, | |
mail.Items[A_LoopField].Move(myDestFolder) | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment