Listen Outlook Mail

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
vSky
Posts: 80
Joined: 30 May 2022, 10:13

Listen Outlook Mail

26 Feb 2023, 19:53

I want to sort the incoming mails by filtering them, but I have no idea how to get the mails.

I didn't get results like this. Can you help me?

Code: Select all

#NoEnv
SetWorkingDir %A_ScriptDir%

outlook := ComObjCreate("Outlook.Application")


inbox := outlook.GetNamespace("MAPI").GetDefaultFolder(6)
messages := inbox.Items

messages.Filter := "@alax.com"

Loop % messages.Count
{
    message := messages.Item[A_Index]

    if (message.SenderEmailAddress ~= "@alax.com")
        MsgBox % "Konu: " . message.Subject . "`nGönderen: " . message.SenderEmailAddress
}


outlook := ""
Edit: I solved. please close topic

Code: Select all

#NoEnv
SetWorkingDir %A_ScriptDir%

outlook := ComObjCreate("Outlook.Application")

inbox := outlook.GetNamespace("MAPI").GetDefaultFolder(6)
messages := inbox.Items

Loop % messages.Count
{
    message := messages.Item[A_Index]
    MsgBox % "Konu: " . message.Subject
}


outlook := ""
[Mod action: Topic moved from the main "Ask for Help" because that is now for v2 help.]

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], olshev and 112 guests