TheOne23 Posted November 12, 2018 Share Posted November 12, 2018 Hi Everyone, i would like to ask your assistance to check the issue on outlookex.au3. my script before was running smoothly but as of today I got error while running it. Below is the script i am having issues with outlookex.au3 Attached is the actual error from outlookex.au3 Your help will be greatly appreciated. #include <OutlookEX.au3> #include <Array.au3> Global $oOutlook = _OL_Open() If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended) Global $aOL_Item = _OL_ItemFind($oOutlook, "RonaldJayson_paggao@comcast.com\Inbox\BP_automation", $olMail, "[UnRead]=True", "", "", "EntryID,body,receivedtime,senderemailaddress", "", 2) _ArrayDisplay($aOL_Item) ; This code was working before but today it has an issue and error. Global $aOL_Item = _OL_ItemFind($oOutlook, "RonaldJayson_paggao@comcast.com\Inbox\BP_automation", $olMail, "[UnRead]=True", "", "", "EntryID,Subject", "", 2) _ArrayDisplay($aOL_Item) ; this code works but i need to use the previouse code with item properties "EntryDI,body,receivedtime,senderemailaddress" Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 12, 2018 Moderators Share Posted November 12, 2018 (edited) Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here. Do not create AutoIt-related topics here, use the AutoIt General Help and Support forums. Moderation Team Edited November 12, 2018 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
TheOne23 Posted November 12, 2018 Author Share Posted November 12, 2018 Hi Everyone, i would like to ask your assistance to check the issue on outlookex.au3. my script before was running smoothly but as of today I got error while running it. Below is the script i am having issues with outlookex.au3 Attached is the actual error from outlookex.au3 Your help will be greatly appreciated. #include <OutlookEX.au3> #include <Array.au3> Global $oOutlook = _OL_Open() If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended) Global $aOL_Item = _OL_ItemFind($oOutlook, "RonaldJayson_paggao@comcast.com\Inbox\BP_automation", $olMail, "[UnRead]=True", "", "", "EntryID,body,receivedtime,senderemailaddress", "", 2) _ArrayDisplay($aOL_Item) ; This code works before but today it was having issues and error under outlookex.au3 Global $aOL_Item = _OL_ItemFind($oOutlook, "RonaldJayson_paggao@comcast.com\Inbox\BP_automation", $olMail, "[UnRead]=True", "", "", "EntryID,Subject", "", 2) _ArrayDisplay($aOL_Item) ; this code works but i need to use the above code that should display or get this properties "EntryID,body,receivedtime,senderemailaddress" Link to comment Share on other sites More sharing options...
water Posted November 12, 2018 Share Posted November 12, 2018 IIRC this is caused by some type of mails in your inbox (read receipts etc.) which do not provide the full set of properties you request. To solve the problem you can reduce the number of properties to be returned, or call _OL_ErrorNotify(4) before calling _OL_ItemFind and then reset it by calling _OL_ErrorNotify(0). The disadvantage is that ALL error messages/@error settings get ignored. I suggest to use the first solution by just returning EntryID. Then call _OL_ItemGet for each returned mail and retrieve the additional properties for the items you are interested in. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 12, 2018 Moderators Share Posted November 12, 2018 Please stick to one topic - Threads merged. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
TheOne23 Posted November 13, 2018 Author Share Posted November 13, 2018 Hi Water, Thank you for your response and solution for this issue. You are correct, a certain mail makes the issue with it's security settings. I will try to check how to use _OL_itemGet(). If you can give some example it would be great. Thank you. Link to comment Share on other sites More sharing options...
TheOne23 Posted November 13, 2018 Author Share Posted November 13, 2018 Hi Jlogan, Thank you for your reminder. Just got confused yesterday. Thank you. Link to comment Share on other sites More sharing options...
water Posted November 13, 2018 Share Posted November 13, 2018 The following code snippet searches for all unread mails in the inbox and displays the subject for the first unread mail: #include "..\OutlookEX.au3" Global $oOutlook = _OL_Open() If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended) _OL_ErrorNotify(2) $aFolder = _OL_FolderAccess($oOutlook, "", $olFolderInbox) Global $aResult = _OL_ItemFind($oOutlook, $aFolder[1], $olMail, "[Unread]=True", "", "", "EntryID") If @error Then MsgBox(16, "OutlookEX UDF", "Error: @error = " & @error & ", @extended = " & @extended) Else Global $oItem = _OL_ItemGet($oOutlook, $aResult[1][0], Default, -1) MsgBox(0, "Test", "Subject of the first unread mail: " & @CRLF & $oItem.Subject) EndIf _OL_Close($oOutlook) My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
TheOne23 Posted November 21, 2018 Author Share Posted November 21, 2018 Hi Water, Thank you for your great help on this. I really appreciate your help. Thanks. Link to comment Share on other sites More sharing options...
water Posted November 21, 2018 Share Posted November 21, 2018 Glad you Like the OutlookEX UDF My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - 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