Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
Created March 29, 2021 11:19
Show Gist options
  • Save JoeGlines/4f8d693a6991c17051bdedc04f261ae6 to your computer and use it in GitHub Desktop.
Save JoeGlines/4f8d693a6991c17051bdedc04f261ae6 to your computer and use it in GitHub Desktop.
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