Regency Posted May 4, 2009 Share Posted May 4, 2009 Ok, I have an Outlook UDF that can be found on this site. I am unable to get a read out of the _arraydisplay, i am guessing because my outlooks messed up (Outlook 2003) My email inbox and such look like this. -Personal Folders -Deleted Items -Drafts -Inbox -Junk E-mail -Sent Mail -Search Folders -ScorpiA -[Gmail] -All Mail ---- This is where all my mail is thats new. -Drafts -Sent Mail -Spam -Starred -Trash -Inbox I have used the demo part of the udf, and cant seem to get into the All Mail part of the outlook program. Can anyone provide some insight? #Include "C:\Program Files\Autoit3\Include\Outlook.au3" #include<array.au3> $OL = _outlookopen() $xx = _OutlookGetMail($OL,"[Gmail]" & "\All Mail","","","","","","RE:Captcha","",'',"",0) _Arraydisplay($xx) Link to comment Share on other sites More sharing options...
Juvigy Posted May 4, 2009 Share Posted May 4, 2009 Could you tell me in which folder is the email that you want to read and how do you identify it ? I guess this is the subject - "RE:Captcha"? Link to comment Share on other sites More sharing options...
Regency Posted May 4, 2009 Author Share Posted May 4, 2009 Yeah, and the folder i need to get at is the "All Mail" Folder under the Scorpia \ [Gmail] \ Folders Link to comment Share on other sites More sharing options...
Juvigy Posted May 4, 2009 Share Posted May 4, 2009 (edited) That should work: Global $test,$test2 $oOApp = ObjCreate("Outlook.Application") $myNamespace =$oOApp.GetNamespace("MAPI") $myFolder = $myNamespace.GetDefaultFolder(5) $myNewFolder = $myNamespace.Folders() For $element in $myNewFolder If $element.Name=="[Gmail]" then $test=$element.Folders() next For $element in $test If $element.Name<>"All Mail" then ContinueLoop $test2=$element next $a=0 For $element in $test2 If $element.Items($a).subject=="RE:Captcha" then MsgBox(0,"",$element.Items($a).Body) $a=$a+1 next Edit: Forgot to increment the counter:) Edited May 4, 2009 by Juvigy Link to comment Share on other sites More sharing options...
IQ9003 Posted July 1, 2009 Share Posted July 1, 2009 (edited) Thanks, this his solution works. Do you know how to read sub-folders? I can't seem to adapt the script to read another sub-folder from the Inbox. I want to read mail from these folders: Mailbox_user => Inbox => Accepted Mailbox_user => Inbox => Denied Edit: Sorry, just after I was typing this i got it working. Global $test,$test2, $test3 $oOApp = ObjCreate("Outlook.Application") $myNamespace =$oOApp.GetNamespace("MAPI") $myFolder = $myNamespace.GetDefaultFolder(5) $myNewFolder = $myNamespace.Folders() For $element in $myNewFolder If $element.Name=="Mailbox_user" then $test=$element.folders() next For $element in $test If $element.Name=="Inbox" then $test2=$element.folders() next For $element in $test2 If $element.Name=="Accepted" then $test3=$element next For $a = 1 to $test3.items.count If $test3.Items($a).subject="Fw:Mytest" then MsgBox(0,"Titel",$test3.Items($a).flagicon) next Edited July 1, 2009 by IQ9003 Link to comment Share on other sites More sharing options...
water Posted July 1, 2009 Share Posted July 1, 2009 A very good Outlook.udf can be found here. If it doesn't provide what you need it can at least give you an idea how to do it yourself. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now