IanN1990 Posted August 19, 2016 Share Posted August 19, 2016 (edited) Hi, I recently gained access to a shared mailbox within my team. Previously my work would only search the users inbox for information, but now i have a group one this will everything faster and easier for me to maintain (As i only need to look after one box, rather then depend on people having their boxes correctly) but i am run into a problem. #include <OutlookEX.au3> Global $oOutlook = _OL_Open() ;Example 1 Works $aResult = _OL_FolderTree($oOutlook, "*") _ArrayDisplay($aResult, "Shows my folder structure") ;Example 2 Works $aResult = _OL_FolderTree($oOutlook, "ian.name@company.com\") _ArrayDisplay($aResult, "Shows my folder structure") ;Example 3 fails $aResult = _OL_FolderTree($oOutlook, "Configuration.Admin@company.com\") _ArrayDisplay($aResult, "Fails") ;"\\office.local\DFSroot2$\UserHome6$\Ian.Name\profile\Desktop\EUC Automation\3ƠPrograms\AutoIt3\Include\OutlookEX.au3" (1269) : ==> The requested action with this object has failed.: ;$oFolder = $oNamespace.Folders($aFolders[1]) ;$oFolder = $oNamespace^ ERROR As always now, i research before posting but it doesn't not many people are trying to do what i do. I found the wiki Page https://www.autoitscript.com/wiki/OutlookEX_UDF_-_General#Folders "rootfolder\subfolder\...\subfolder" any public folder or any folder of the current user (replace rootfolder with * to access the root folder of your mailbox) "\\firstname name" default folder of another user (class specified by $iOL_FolderType) (replace "firstname name" with "*" to access your mailbox) "\\firstname name\\subfolder\...\subfolder" subfolder of the default folder of another user (class specified by $iOL_FolderType) "\\firstname name\subfolder\..\subfolder" subfolder of another user "" default folder of the current user (class specified by $iOL_FolderType) "\subfolder" subfolder of the default folder of the current user (class specified by $iOL_FolderType) but searching though the .au3 i cant find any reference to $iOL_FolderType. So where am i going wrong? I can confirm i have access to the mailbox as i can use it. Ian Edited August 19, 2016 by IanN1990 Link to comment Share on other sites More sharing options...
water Posted August 19, 2016 Share Posted August 19, 2016 Did you try $aResult = _OL_FolderTree($oOutlook, "Configuration.Admin@company.com") ; Notice that I removed the trailing backslash 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...
water Posted August 19, 2016 Share Posted August 19, 2016 Which version of AutoIt do you run? Which version of the OutlookEX UDF do you run? 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...
IanN1990 Posted August 19, 2016 Author Share Posted August 19, 2016 Hi water, Just tired it without the backlash but same error message. Lastest UDF, just redownloaded from your page and Version 3.5.4 SciTE-Lite Link to comment Share on other sites More sharing options...
water Posted August 19, 2016 Share Posted August 19, 2016 (edited) Can't test at the moment but I think it should work this way: Global $aFolder = _OL_FolderAccess($oOutlook, "Configuration.Admin@company.com", $olFolderInbox) Global $aResult = _OL_FolderTree($oOutlook, $aFolder[1]) _ArrayDisplay($aResult) Edited August 19, 2016 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 Link to comment Share on other sites More sharing options...
IanN1990 Posted August 19, 2016 Author Share Posted August 19, 2016 (edited) Same error i am afraid Though in that example the error happens because of the _Ol_folderAccess Part and doesn't reach _Ol_folderTree Edited August 19, 2016 by IanN1990 Link to comment Share on other sites More sharing options...
water Posted August 19, 2016 Share Posted August 19, 2016 OK. This means I need to check as soon as I return to my office. Please stay tuned. 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...
IanN1990 Posted August 19, 2016 Author Share Posted August 19, 2016 Cool For testing i also tired it with ian.name@company.com and the code worked Link to comment Share on other sites More sharing options...
water Posted August 20, 2016 Share Posted August 20, 2016 I tested with a public folder and it works the way you did in your first post. Could you please run the following script so we are sure there is no old version of the UDF flying around? #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) MsgBox(0, "AutoIt version", " AutoIt version: " & @AutoItVersion) Global $aVersion = _OL_VersionInfo() _ArrayDisplay($aVersion) Global $aResult = _OL_FolderTree($oOutlook, "Configuration.Admin@company.com") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating folder tree. @error = " & @error) _ArrayDisplay($aResult) _OL_Close($oOutlook) Please post the result of the MsgBox and the _ArrayDisplay. 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...
IanN1990 Posted August 21, 2016 Author Share Posted August 21, 2016 (edited) Autoit Version 3.3.14.2 V 1 1 0 20160720 3.3.10.2 wooltown, water progandy (CSV functions), Ultima, PsaltyDS (base of the __OL_ArrayConcatenate function) $oFolder = $oNamespace.Folders($aFolders[1]) $oFolder = $oNamespace^ ERROR Edited August 21, 2016 by IanN1990 Link to comment Share on other sites More sharing options...
IanN1990 Posted August 21, 2016 Author Share Posted August 21, 2016 (edited) I just ran the code again for some reason its not crashing gives the @error gives 2 Edited August 21, 2016 by IanN1990 Link to comment Share on other sites More sharing options...
water Posted August 21, 2016 Share Posted August 21, 2016 That's the error code of _OL_FolderAccess or _OL_FolderTree? 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...
water Posted August 21, 2016 Share Posted August 21, 2016 BTW: Can you please download the latest version (1.2.1.0) of the OutlookEX UDF? COM error handling has been improved! 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...
IanN1990 Posted August 22, 2016 Author Share Posted August 22, 2016 The @error was the code proved On 20 August 2016 at 8:43 AM, water said: I tested with a public folder and it works the way you did in your first post. Could you please run the following script so we are sure there is no old version of the UDF flying around? #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) MsgBox(0, "AutoIt version", " AutoIt version: " & @AutoItVersion) Global $aVersion = _OL_VersionInfo() _ArrayDisplay($aVersion) Global $aResult = _OL_FolderTree($oOutlook, "Configuration.Admin@company.com") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating folder tree. @error = " & @error) _ArrayDisplay($aResult) _OL_Close($oOutlook) Please post the result of the MsgBox and the _ArrayDisplay. The @error = 2 was produced by this code (though i changed the @company to my companyname). I also went into OutlookEX and copied this ; #INDEX# ======================================================================================================================= ; Title .........: Microsoft Outlook Function Library (MS Outlook 2003 and later) ; AutoIt Version : 3.3.10.2 ; UDF Version ...: 1.2.1.0 So it is the lastestv ersion from your download page. I ensured it is being used by adding Msgbox(0, "Test", Test") and re-ran to script (the msgbox appeared) so it is being used. Link to comment Share on other sites More sharing options...
water Posted August 22, 2016 Share Posted August 22, 2016 In this case we need to extend the error message we get: If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating folder tree. @error = " & @error & ", @extended = " & @extended) I will be on vacation for a week now. So my responses will slow down till next Sunday. 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...
IanN1990 Posted August 22, 2016 Author Share Posted August 22, 2016 (edited) Running your code the response is "Error creating folder tree. @error = 2, @extended = 4." Hope you have a nice vacation This has no priority compared to that Edited August 22, 2016 by IanN1990 Link to comment Share on other sites More sharing options...
IanN1990 Posted August 28, 2016 Author Share Posted August 28, 2016 Is there anything else i can provide to help in troubleshooting? Link to comment Share on other sites More sharing options...
water Posted August 29, 2016 Share Posted August 29, 2016 Could you please post (or PM) a screenshot of the Outlook folder pane (at least the part with the root you want to access). 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...
IanN1990 Posted August 29, 2016 Author Share Posted August 29, 2016 Sorry for the delay, it seams image uploading doesn't work in IE9. I have include an image as request, please dont take offense to anything blanked out Link to comment Share on other sites More sharing options...
IanN1990 Posted August 29, 2016 Author Share Posted August 29, 2016 Seams i am a idiot, i do apologize for all the trouble i have caused you. _OL_FolderTree($oOutlook, "Configuration Admin") works 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