water Posted May 3, 2013 Author Share Posted May 3, 2013 (edited) When you compile (Ctrl+F7 in SciTE) could you deactivate obfuscator (uncheck "Run Obfuscator before compilation" on the last tab) and UPX compression (uncheck "Use UPX" on the first tab)? Windows 8 was released after the last AutoIt production version (3.3.8.1). If the above doesn't work you could try the latest AutoIt beta version (3.3.9.4). Edited May 3, 2013 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...
Neutro Posted May 5, 2013 Share Posted May 5, 2013 You could try and provide the password with _OL_Open as 6th parameter.The thing is that I am deploying this script on all computers of our active directory domain, so I can not hardcode the logins/password.But don't bother with this, it's running fine already thanks to you Identify active network connections and change DNS server - Easily export Windows network settings Clean temporary files from Windows users profiles directories - List Active Directory Groups members Export content of an Outlook mailbox to a PST file - File patch manager - IRC chat connect example Thanks again for your help Water! Link to comment Share on other sites More sharing options...
water Posted May 5, 2013 Author Share Posted May 5, 2013 Glad to hear 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...
richietheprogrammer Posted May 10, 2013 Share Posted May 10, 2013 Hey all, running into an issue. First of all I would like to thank Water for the incredible work, as OutlookEX has provided me with a lot of help to come up with scripts I always thought were impossible . Now to the issue: I wrote a script that uses OutlookEX, and I tested it maybe a few hundred times, with Outlook open, and it worked every single time. I put that script off to the side for a while, and now I am back to it. Every time I try to run it, it fails at : OutlookEX.au3 (1171) : ==> Error in expression.:Local $oNamespace = $oOL.GetNamespace("MAPI") Local $oNamespace = ^ ERROR The error is on line 1171 in OutlookEX.au3, inside OL_FolderAccess. Here is the even more weird part: I try the same script on all my other computers, and I have absolutely no problems running it. I am making sure Outlook is open (Using outlook 2013 on all the machines), and nothing major has changed since the last time I attempted the script and it worked on this machine. It's driving me insane because I cant figure out what it could be. Do you guys have any ideas? Thanks for any help again! Link to comment Share on other sites More sharing options...
water Posted May 10, 2013 Author Share Posted May 10, 2013 User JailDoctor hat a similar problem He tried to call another function but didn't notice that _OL_Open had returned an error. So please make sure you call _OL_Open at the start of you script and that it doesn't return an error. richietheprogrammer 1 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...
richietheprogrammer Posted May 10, 2013 Share Posted May 10, 2013 Thanks for your reply. I started a new code and I have: #include <OutlookEX.au3> _OL_Open() and it returns: OM Error Encountered in test.au3 OutlookEx UDF version = 0.9.0 @AutoItVersion = 3.3.8.1 @AutoItX64 = 0 @Compiled = 0 @OSArch = X64 @OSVersion = WIN_7 Scriptline = 185 NumberHex = 800401F3 Number = -2147221005 WinDescription = Invalid class string Description = Source = HelpFile = HelpContext = 1027423549 LastDllError = 1008 ======================================================== Any ideas? Thanks for your help! Link to comment Share on other sites More sharing options...
water Posted May 10, 2013 Author Share Posted May 10, 2013 Line 185 is $oOL = ObjCreate("Outlook.Application") in function _OL_Open. Are you sure Outlook is installed and starts properly on this machine? 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...
richietheprogrammer Posted May 10, 2013 Share Posted May 10, 2013 Yes and Yes (ish). I use Outlook 2013 (shouldnt matter from what I understand). I remember sometimes when I start Outlook it displays "There is no email program associated to perform the request action". After clicking OK, Outlook launches fine. This just started happening recently. Im starting to think that's what the issue is. Maybe I should reinstall Outlook? Link to comment Share on other sites More sharing options...
water Posted May 10, 2013 Author Share Posted May 10, 2013 Maybe I should reinstall Outlook? That's what I would have suggested next. Errotext "Invalid class string" looks like a problem with a corrupted registry key. richietheprogrammer 1 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...
richietheprogrammer Posted May 10, 2013 Share Posted May 10, 2013 I will try and post the results. Thank you much!! Link to comment Share on other sites More sharing options...
water Posted May 10, 2013 Author Share Posted May 10, 2013 Hope the problem can be solved by re-installing Outlook 2013. I've only Outlook 2010 here so searching for a bug would be a bit cumbersome. 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...
richietheprogrammer Posted May 10, 2013 Share Posted May 10, 2013 Yep, re-installing Office worked. Code compiles now. Thank you! Cheers! Link to comment Share on other sites More sharing options...
water Posted May 10, 2013 Author Share Posted May 10, 2013 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...
ngskicker Posted May 18, 2013 Share Posted May 18, 2013 Hey water, Can you show me how to this in your UDF, this pieces of script is C# // Set email account sender, in this example i use my 2nd account Outlook.NameSpace myNameSpace = oApp.GetNamespace("MAPI"); Outlook.Accounts myAddressLists = myNameSpace.Accounts; oMsg.SendUsingAccount = myNameSpace.Accounts[2]; Link to comment Share on other sites More sharing options...
water Posted May 18, 2013 Author Share Posted May 18, 2013 Never tried to send a mail using a second account. But _OL_Open has parameter $sProfileName which might do what you need. 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...
ngskicker Posted May 18, 2013 Share Posted May 18, 2013 Never tried to send a mail using a second account. But _OL_Open has parameter $sProfileName which might do what you need. thanks for your reply water, but i need to send with 2nd accound (account with index number 2) so i dont have account name, or is there any way to get the account name by using the index Link to comment Share on other sites More sharing options...
water Posted May 18, 2013 Author Share Posted May 18, 2013 Which version of Outlook 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...
ngskicker Posted May 18, 2013 Share Posted May 18, 2013 I use the 2013 version but this script should be used in the 2007 version, Link to comment Share on other sites More sharing options...
water Posted May 18, 2013 Author Share Posted May 18, 2013 If you run the example script _OL_AccountGet.au3 do you get the acount you want to use? 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...
ngskicker Posted May 18, 2013 Share Posted May 18, 2013 Yes, i get it, because I am still a beginner, please give me an example of creating and sending email using a specific account, or at least please give me the info which functions should I use Link to comment Share on other sites More sharing options...
Recommended Posts