Gumma Posted October 20, 2010 Posted October 20, 2010 A few little tidbits about my system:I'm working with WinXP and Outlook 2007.I am just playing with the following script but I can't figure out exactly what I'm doing wrong. I've used other UDFs for word, excel, etc but I can't seem to get this to work.Here's the script:#Include <Date.au3> #Include <Array.au3> #Include "C:\Documents and Settings\username\Desktop\Outlook\Outlook.au3" Local $oOutlook, $test, $test2 $test2 = _OutlookOpen() _OutlookOpen() sleep(100) $test= _OutlookSendMail($oOutlook, "email@email.org", "", "", "test", "this is the body") _OutlookSendMail($oOutlook, "email@email.org", "", "", "test", "this is the body") msgbox(0,0,$test & $test2)I just created those two variables to see if I was getting any results or anything, but it doesn't even get me that far. When I read the syntax, it seems like I should be doing it correctly but I get this error:>Running:(3.3.0.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\SendMail Test.au3" C:\Documents and Settings\dlenaker\Desktop\Outlook\Outlook.au3 (420) : ==> Error in expression.:Local $oMessage = $oOutlook.CreateItem($olMailItem)Local $oMessage = ^ ERROR->13:16:27 AutoIT3.exe ended.rc:1+>13:16:28 AutoIt3Wrapper Finished>Exit code: 1 Time: 1.853Can anyone help show me what I'm doing wrong? Thanks in advance.
water Posted October 21, 2010 Posted October 21, 2010 Why do you call the functions twice? Your code should look like: #Include <Date.au3> #Include <Array.au3> #Include "C:\Documents and Settings\username\Desktop\Outlook\Outlook.au3" Local $oOutlook, $iresult $oOutlook = _OutlookOpen() sleep(100) $iResult= _OutlookSendMail($oOutlook, "email@email.org", "", "", "test", "this is the body") msgbox(0,"Outlook SendMail","Returncode: " & $iResult) My UDFs and Tutorials: Reveal hidden contents 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