souldjer777 Posted July 17, 2015 Share Posted July 17, 2015 (edited) Good Morning Everyone and Happy Friday!First - of course: Thanks to everyone in AutoIT - You help systems administrators and programmers everywhere get help to folks that need it with fluid automation I can personally say that you've helped literally thousands of people I've distribute exe's too. Amazing work, you've saved so many of us all time, redundancy and pain. You've quite honestly given many folks their time back... On with the questions then...Having real trouble getting this OutlookEX UDF to work... getting "Error creating a connection to Outlook. @error = 1, @extended = -2147221164"I see from previous issues that means"The error code stands for '80040154 Class not registered'.Means: The class is unknown to the user running the script. I assume you use the system account to run the script in the task scheduler?"I'm running the script from SciTE#AutoIt3Wrapper_AU3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=Y #RequireAdmin #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) ; ***************************************************************************** ; Example 1 ; Send a html mail to the current user. ; Add an attachment and set importance to high. ; ***************************************************************************** Global $sCurrentUser = $oOutlook.GetNameSpace("MAPI").CurrentUser.Name _OL_Wrapper_SendMail($oOutlook, $sCurrentUser, "", "", "TestSubject", "Body<br><b>fett</b> normal.", @ScriptDir & "\_OL_Wrapper_SendMail.au3", $olFormatHTML, $olImportanceHigh) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OutlookSendMail Wrapper Script", "Error sending mail. @error = " & @error & ", @extended: " & @extended) MsgBox(64, "OutlookEX UDF: _OutlookSendMail Wrapper Script", "Mail successfully sent to user '" & $sCurrentUser & "'!") _OL_Close($oOutlook)Using Windows 7 x64 and Outlook 2013.Thanks Everyone!Also... getting error...Global $sCurrentUser = $oOutlook.GetNameSpace("MAPI").CurrentUser.NameGlobal $sCurrentUser = $oOutlook^ ERROR...using the following sample code taken from this forum.#AutoIt3Wrapper_AU3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=N #include <File.au3> #include <GUIConstants.au3> #include <GuiButton.au3> #include <GUIConstantsEx.au3> #include <GUIToolTip.au3> #include <Array.au3> #include <Constants.au3> #include <Date.au3> #include <WinAPIFiles.au3> #include <ScreenCapture.au3> #include <OutlookEX.au3> #include <WinAPIFiles.au3> Global $iFileName, $Form1_1 Global $oOutlook = _OL_Open() GLobal $sTo = "emailaddress@gmail.com;" $Form1_1 = GUICreate("System Information", 1083, 638, 182, 114) GUISetState(@SW_SHOW) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended) $iFileName = @DesktopDir & "\Utility Screenshot - " & @MON & "." & @MDAY & "." & @YEAR & " - (" & @HOUR & "." & @MIN & "." & @SEC & ").jpg" _ScreenCapture_CaptureWnd($iFileName, $Form1_1) Global $sCurrentUser = $oOutlook.GetNameSpace("MAPI").CurrentUser.Name _OL_Wrapper_SendMail($oOutlook, $sTo, "", "", "Configuration Utility Screenshot", "Attached please find the Configuration Utilty Screenshot.<br>Automatically sent via the Configuration Utlity<br>Thank you, <br>" & $sCurrentUser, $iFileName, $olFormatHTML, $olImportanceHigh) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OutlookSendMail Wrapper Script", "Error sending mail. @error = " & @error & ", @extended: " & @extended) MsgBox(64, "OutlookEX UDF: _OutlookSendMail Wrapper Script", "Mail successfully sent to user '" & $sCurrentUser & "'!") _OL_Close($oOutlook)*** I have a separate login for MS Outlook 2013 because I have multiple ID's *** Do I have to run it as the current mailbox user???Thanks again! Edited July 20, 2015 by souldjer777 "Maybe I'm on a road that ain't been paved yet. And maybe I see a sign that ain't been made yet"Song Title: I guess you could sayArtist: Middle Class Rut Link to comment Share on other sites More sharing options...
water Posted July 24, 2015 Share Posted July 24, 2015 If you want to connect to a running instance of Outlook the AutoIt script has to be run from the same user as the one who startet Outlook. 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...
souldjer777 Posted July 24, 2015 Author Share Posted July 24, 2015 This water guy is a GENIUS - no joking what so ever - I appreciate all the help and feedback!!! Thank you water!!! You guys need to start selling AutoIT gear - you know to pay for the servers, pizza... and coffee!!! "Maybe I'm on a road that ain't been paved yet. And maybe I see a sign that ain't been made yet"Song Title: I guess you could sayArtist: Middle Class Rut Link to comment Share on other sites More sharing options...
water Posted July 25, 2015 Share Posted July 25, 2015 I'm glad you like the support you get from the forum!Jon has a donate button on the forum homepage. If you like AutoIt you can donate a few bucks to keep the forum up and running 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...
XinYoung Posted March 15, 2018 Share Posted March 15, 2018 Hello... old thread, i know... I'm receiving this same error, but I'm the only user running Outlook and the script. I don't understand why it can't connect. Link to comment Share on other sites More sharing options...
water Posted March 15, 2018 Share Posted March 15, 2018 Did you check the wiki for possible reasons? 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...
Juvigy Posted March 16, 2018 Share Posted March 16, 2018 And maybe show us the code and the error you get a it might be a different thing. Link to comment Share on other sites More sharing options...
XinYoung Posted March 16, 2018 Share Posted March 16, 2018 The red part is where the problem seems to stem from. From doing a some research, it seems like I'm using an outdated function or something. I really don't know... Someone else wrote this script about a year ago, and it worked fine for me for months. Now, all of a sudden, I receive the OL_Wrapper error every time. #include <OutlookEX.au3> #include <OutlookExConstants.au3> Global $oOutlook = _OL_Open() If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended) Local $sTo = $recipient Local $sCc = "" Local $sBCc = "" Local $sSubject = "blah" Local $sBody = "blah blah" Local $sAttachments = $someExcelsheet _OL_Wrapper_SendMail($oOutlook, $sTo, $sCc, $sBCc, $sSubject, $sBody, $sAttachments, $olFormatHTML, $olImportanceNormal) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OutlookSendMail Wrapper Script", "Error sending mail. @error = " & @error & ", @extended: " & @extended) _OL_Close($oOutlook) Link to comment Share on other sites More sharing options...
Earthshine Posted March 16, 2018 Share Posted March 16, 2018 did you recently update to the newer version of AutoIt perhaps? My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
XinYoung Posted March 16, 2018 Share Posted March 16, 2018 Yes, but i still have the old one too. I launch the old Scite and run the script from within there. It references all the old "Include" files and such. Link to comment Share on other sites More sharing options...
water Posted March 16, 2018 Share Posted March 16, 2018 Can you please post the full SciTE console output? 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...
XinYoung Posted March 16, 2018 Share Posted March 16, 2018 (edited) here it is... thanks guys >"C:\Users\mchu\Desktop\Kamikaze Scripts & Templates\- Editor_Old\SciTE4AutoIt3\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\mchu\Desktop\Kamikaze Scripts & Templates\Kamikaze - KO\BB-Testing.au3" /UserParams +>10:58:29 Starting AutoIt3Wrapper v.15.503.1200.1 SciTE v.3.5.4.0 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409) +> SciTEDir => C:\Users\mchu\Desktop\Kamikaze Scripts & Templates\- Editor_Old\SciTE4AutoIt3 UserDir => C:\Users\mchu\Desktop\Kamikaze Scripts & Templates\- Editor_Old\SciTE4AutoIt3\AutoIt3Wrapper >Running AU3Check (3.3.12.0) from:C:\Users\mchu\Desktop\Kamikaze Scripts & Templates\- Editor_Old input:C:\Users\mchu\Desktop\Kamikaze Scripts & Templates\Kamikaze - KO\BB-Testing.au3 +>10:58:29 AU3Check ended.rc:0 >Running:(3.3.12.0):C:\Users\mchu\Desktop\Kamikaze Scripts & Templates\- Editor_Old\autoit3_x64.exe "C:\Users\mchu\Desktop\Kamikaze Scripts & Templates\Kamikaze - KO\BB-Testing.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop --> IE.au3 T3.0-1 Warning from function _IEAttach, $_IESTATUS_NoMatch Edited March 16, 2018 by XinYoung Link to comment Share on other sites More sharing options...
water Posted March 16, 2018 Share Posted March 16, 2018 Looks good. Does this mean that your script works with AutoIt 3.3.12.0 and doesn't with 3.3.14.4? 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...
XinYoung Posted March 16, 2018 Share Posted March 16, 2018 i dont know about 3.3.14.4. I use 3.3.14.2 normally Link to comment Share on other sites More sharing options...
water Posted March 17, 2018 Share Posted March 17, 2018 Should not be a big difference between 3.3.14.4 and 3.3.14.2 regarding the OutlookEX UDF. So: Does this mean that your script works with AutoIt 3.3.12.0 and doesn't with 3.3.14.2? 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