Explorer_of_tools Posted December 4, 2019 Posted December 4, 2019 I have an already opened outlook window with all proper content, attachments, To, Subject. I just want to send that email. Is it possible to do with AutoIT or the OutlookEX package?
water Posted December 4, 2019 Posted December 4, 2019 Sure. I will post an example when I return to my office. 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
Explorer_of_tools Posted December 4, 2019 Author Posted December 4, 2019 Thankyou water. I just want an example for sending a properly drafted mail. Thanks in Advance. It would be helpful if i could get to know by when i could expect the same from you.
water Posted December 4, 2019 Posted December 4, 2019 Something like this (untested): Global $oOL = _OL_Open() Global $oInspector = $oOL.ActiveInspector Global $oItem = $oInspector.CurrentItem Global $oItem.Send Explorer_of_tools 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
Explorer_of_tools Posted December 4, 2019 Author Posted December 4, 2019 An error is displayed stating that, Error: No variable given for 'Dim', 'Local" , 'Global' , "struct", "Const" Statement This is my code:- #include <OutlookEx.au3> Local $title="Hellooo - Message (HTML) " ; Title of the outlook drafted mail that i want to send WinWait($title) If WinActive($title) Then Global $oOL = _OL_Open() Global $oInspector = $oOL.ActiveInspector Global $oItem = $oInspector.CurrentItem Global $oItem.Send EndIf
Explorer_of_tools Posted December 4, 2019 Author Posted December 4, 2019 Even if i take off that IF condition, it isn't working. The above error is displayed. Also tried using Local variable instead of Global, although it shouldn't matter, but still it isn't working. Check me out and let me know. Thanks.
Explorer_of_tools Posted December 4, 2019 Author Posted December 4, 2019 That error is occurred as $oItem is declared twice as new variable initialization. When removed, it works fine. Thanks a lot.
water Posted December 4, 2019 Posted December 4, 2019 (edited) My bad Replace „Global $oItem.Send“ with „$oItem.Send“ Edit: Just noticed that you solved it yourself. Edited December 4, 2019 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
Explorer_of_tools Posted December 5, 2019 Author Posted December 5, 2019 It's okay. Thanks a lot for helping out with the code.
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