chet121 Posted August 27, 2013 Posted August 27, 2013 Hello, I wrote a script to go through my email using _OL_ItemFind(). It has been working fine up to today. I do not recieve any errors when connecting using _OL_Open(), but when I try to search through my inbox using _OL_ItemFind() an error message comes up. COM Error Encountered in New AutoIt v3 Script.au3 OutlookEx UDF version = 0.9.0 @AutoItVersion = 3.3.8.1 @AutoItX64 = 0 @Compiled = 0 @OSArch = X64 @OSVersion = WIN_7 Scriptline = 2673 NumberHex = 80020009 Number = -2147352567 WinDescription = Description = Your Digital ID name cannot be found by the underlying security system. Source = Microsoft Outlook HelpFile = HelpContext = 0 LastDllError = 0 My code looks like Global $oOL = _OL_Open() ;~ MsgBox(0,"error","Errory is " & @error & @CRLF & "extended is " & @extended) Global $aItmes = _OL_ItemFind($oOL, "*Inbox", $olMail, "", "", "", "Subject,Body,CreationTime,EntryID", "", 2) _ArrayDisplay($aItmes) _OL_Close($oOL) Thanks in advance for any help.
water Posted August 27, 2013 Posted August 27, 2013 Looks like you've got a digitally signed mail. When Outlook tries to access the properties of the mail the error is raised. Can you remove this mail or do you need a solution to process signed mails as well? 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
chet121 Posted August 27, 2013 Author Posted August 27, 2013 Hi Water, A solution to process the signed mails would be best for a long term solution. I receive a mix of signed and unsigned emails. For the script I'm currently working on, I'll move the non digitally signed emails into a seperate folder and go from there. Thanks for the help, Chet
water Posted August 27, 2013 Posted August 27, 2013 When running AutoIt 3.3.8.1 you can activate the COM error handler (_OL_ErrorNotify) so the script doesn't crash anymore. Can you check if the returned array is correct then? 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
chet121 Posted January 27, 2014 Author Posted January 27, 2014 Hi Water, Sorry for taking so long to reply. I set _OL_ErrorNotify to zero and received the following error. Quote E:AutoIT ScriptsOutlookIncludesOutlookEX.au3 (2673) : ==> The requested action with this object has failed.: $aItems[$iCounter][$iIndex - 1] = $oItem.ItemProperties.Item($aReturnProperties[$iIndex]).value $aItems[$iCounter][$iIndex - 1] = $oItem.ItemProperties^ ERROR Quote Global $oOL = _OL_Open() _OL_ErrorNotify(0) ;~ MsgBox(0,"error","Errory is " & @error & @CRLF & "extended is " & @extended) Global $aItmes = _OL_ItemFind($oOL, "*Inbox", $olMail, "", "", "", "Subject,Body,CreationTime,EntryID", "", 2) _ArrayDisplay($aItmes) _OL_Close($oOL) I did some more testing and I was able to have the correct array returned. I have a physical PKI device/cert and once I authenticated by opening up a signed email, the correct array was returned. I also tried setting _OL_ErrorNotify to 1 and the correct array was returned. Do you know of a way to have outlook/exchange force me to authenticate with my physical cert before running anything like _OL_ItemFind? Thanks again, Chet
water Posted January 27, 2014 Posted January 27, 2014 (edited) Can you test with version 0.10.0.0 of the OutlookEX UDF? This version lets you set _OL_ErrorNotify(4) which means: Enables debugging but creates no output Do you know of a way to have outlook/exchange force me to authenticate with my physical cert ... Not that I know of. Edited January 27, 2014 by water 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
chet121 Posted January 28, 2014 Author Posted January 28, 2014 I've updated to 0.10.0.0 of the OutlookEX UDF. I'm still not having any luck. The error message did change though. I've attached the Outlook_Debug.txt file. Global $oOL = _OL_Open() _OL_ErrorNotify(3) ;~ MsgBox(0,"error","Errory is " & @error & @CRLF & "extended is " & @extended) Global $aItmes = _OL_ItemFind($oOL, "*\Inbox", $olMail, "", "", "", "Subject,Body,CreationTime,EntryID", "", 3) Global $astore = _OL_StoreGet($oOL) _ArrayDisplay($aItmes, "get items") _ArrayDisplay($astore, "get store") ;~ ConsoleWrite($astore[1][7] & @CRLF) _OL_Close($oOL) I am able to enumerate the data stores, but not the email. Not that I know of. I didn't think so, but asking never hurts. Outlook_Debug.txt
water Posted January 28, 2014 Posted January 28, 2014 To process digitally signed mails we need another approach. According to this article it is best to look at the message class. Will have a look in a few days as I'm out of office quite soon. 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
chet121 Posted January 29, 2014 Author Posted January 29, 2014 The artice is being blocked at work, but I will take a look when I go home. I tried a couple of test scenerios with the email in my Inbox. I removed all of the digitally signed emails from my Inbox and received the same error(s). I removed all the email from my Inbox and was able to enumerate an empty Inbox. I moved one of the emails that is not digitally signed into my Inbox and received the same error(s).
water Posted January 31, 2014 Posted January 31, 2014 I tested your script from post #1 here and it works just fine with AutoIt 3.3.10.2 and 3.3.11.3. Can you please check the value of macro @error after you called _OL_ItemdFind? 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
chet121 Posted February 3, 2014 Author Posted February 3, 2014 The @error returned is 4 and the @extended is -2147467260. The script from post #1 works fine when there is no mail in my Inbox, but errors out when I place mail in the Inbox.
water Posted February 3, 2014 Posted February 3, 2014 Can you authenticate using the physical PKI device/cert even if there is no signed mail in the inbox? 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
chet121 Posted February 4, 2014 Author Posted February 4, 2014 I'm not sure I understand your question. I can authenticate using the physical PKI device/cert using other services, webpages and such. I don't get prompted for PKI authentication in outlook until I try to access an encrptyed email. Authentication from Outlook to Exchange is done through username/password. I think my orginization has changed some of security setting and those are interferring with OutlookEX. I installed Outlook on a box that is not getting the policies, and was able to enumerate the email in my inbox sucessfully. This also includes some of the mail that is digitally signed.
water Posted February 4, 2014 Posted February 4, 2014 I'm not familiar with those security settings and the PKI stuff. _OL_Open comes with a feature to click away security warnings. A template is provided which could be changed to your needs. This could solve the problem when opening a signed mail. I don't know how to solve the problem that you can't enumerate a folder even when it doesn't hold signed mails. 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
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