The UDF itself can be downloaded here (please see my signature below).
So if you have any questions, suggestions or errors please post here.
Edited by water, 31 May 2011 - 05:30 AM.
Posted 09 March 2011 - 07:03 PM
Edited by water, 31 May 2011 - 05:30 AM.
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
Posted 18 March 2011 - 01:11 PM
Posted 18 March 2011 - 01:17 PM
Edited by water, 18 March 2011 - 01:18 PM.
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
Posted 18 March 2011 - 01:37 PM
Hi Syed,
Did you call _OutlookOpen() as first statement?
Is Outlook installed on the machine?
Posted 18 March 2011 - 01:42 PM
Edited by water, 18 March 2011 - 01:46 PM.
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
Posted 18 March 2011 - 01:44 PM
Please replace the last parameter of _OutlookSendMail. "Tahoma" is no an valid entry.
You can just use $olFormatHTML, $olFormatPlain, $olFormatRichText, $olFormatUnspecified to specify the format of the body.
Posted 18 March 2011 - 01:47 PM
Edited by water, 18 March 2011 - 01:50 PM.
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
Posted 18 March 2011 - 01:52 PM
Isn't there a type in "$attachemnt"? Shouldn't it read "$attachment"?
BTW: There is an enhanced Outlook UDF available - please see my previous post.
Posted 18 March 2011 - 01:58 PM
#include <OutlookEX.au3> Global $oOutlook = _OL_Open() $iOL_Debug = 2 ; <== Insert this line ; ***************************************************************************** ; Example 1 ; Send an html mail to the current user. ; Add an attachment and set importance to high. ; ***************************************************************************** Global $sCurrentUser = $oOutlook.GetNameSpace("MAPI").CurrentUser.Name _OL_MailSend($oOutlook, "TestSubject", "Body<br><b>fett</b> normal.", $sCurrentUser, @ScriptDir & "\_OL_MailSend.au3", $olImportanceHigh, $olFormatHTML) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_MailSend Example Script", "Error sending mail. @error = " & @error & ", @extended: " & @extended) MsgBox(64, "OutlookEX UDF: _OL_MailSend Example Script", "Mail successfully sent to user '" & $sCurrentUser & "'!")
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
Posted 18 March 2011 - 02:03 PM
yeah..i gave a try and got below message!Could you please run the following script? I inserted one line (denoted by <==) which should give us better error messages. Could you please post the pop up you get?
#include <OutlookEX.au3> Global $oOutlook = _OL_Open() $iOL_Debug = 2 ; <== Insert this line ; ***************************************************************************** ; Example 1 ; Send an html mail to the current user. ; Add an attachment and set importance to high. ; ***************************************************************************** Global $sCurrentUser = $oOutlook.GetNameSpace("MAPI").CurrentUser.Name _OL_MailSend($oOutlook, "TestSubject", "Body<br><b>fett</b> normal.", $sCurrentUser, @ScriptDir & "\_OL_MailSend.au3", $olImportanceHigh, $olFormatHTML) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_MailSend Example Script", "Error sending mail. @error = " & @error & ", @extended: " & @extended) MsgBox(64, "OutlookEX UDF: _OL_MailSend Example Script", "Mail successfully sent to user '" & $sCurrentUser & "'!")
Posted 18 March 2011 - 02:20 PM
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
Posted 18 March 2011 - 02:23 PM
#include <OutlookEX.au3> $iOL_Debug = 2 ; <==This line has been moved Global $oOutlook = _OL_Open() ; ***************************************************************************** ; Example 1 ; Send an html mail to the current user. ; Add an attachment and set importance to high. ; ***************************************************************************** Global $sCurrentUser = $oOutlook.GetNameSpace("MAPI").CurrentUser.Name _OL_MailSend($oOutlook, "TestSubject", "Body<br><b>fett</b> normal.", $sCurrentUser, @ScriptDir & "\_OL_MailSend.au3", $olImportanceHigh, $olFormatHTML) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_MailSend Example Script", "Error sending mail. @error = " & @error & ", @extended: " & @extended) MsgBox(64, "OutlookEX UDF: _OL_MailSend Example Script", "Mail successfully sent to user '" & $sCurrentUser & "'!")
Edited by water, 18 March 2011 - 02:24 PM.
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
Posted 18 March 2011 - 02:57 PM
The modified script works fine only if i have opened the outlook during the script execution orelse the below messages are getting prompted.please let me know if i follow anything wrong.Scriptline 10 seems to be the line before _OL_MailSend.
Could you please run this - modified - version? We try to catch the error as soon as possible.#include <OutlookEX.au3> $iOL_Debug = 2 ; <==This line has been moved Global $oOutlook = _OL_Open() ; ***************************************************************************** ; Example 1 ; Send an html mail to the current user. ; Add an attachment and set importance to high. ; ***************************************************************************** Global $sCurrentUser = $oOutlook.GetNameSpace("MAPI").CurrentUser.Name _OL_MailSend($oOutlook, "TestSubject", "Body<br><b>fett</b> normal.", $sCurrentUser, @ScriptDir & "\_OL_MailSend.au3", $olImportanceHigh, $olFormatHTML) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_MailSend Example Script", "Error sending mail. @error = " & @error & ", @extended: " & @extended) MsgBox(64, "OutlookEX UDF: _OL_MailSend Example Script", "Mail successfully sent to user '" & $sCurrentUser & "'!")
Edited by Syed23, 18 March 2011 - 03:00 PM.
Posted 18 March 2011 - 03:32 PM
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
Posted 19 March 2011 - 11:08 AM
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
Posted 19 March 2011 - 02:05 PM
Hi Syed,
I've been searching the internet high and low but couldn't find a solution.
It seems as if ObjCreate starts up Outlook and returns to your script before the COM interface is up and running. It looks as if Outlook does some of the startup asynchroniously.
The only solution I have so far is to put a Sleep(1000) - or more - after _OL_Open().
Posted 19 March 2011 - 02:10 PM
Edited by water, 19 March 2011 - 02:26 PM.
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
Posted 19 March 2011 - 03:50 PM
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
Posted 21 March 2011 - 07:36 AM
Works fine if I pause for a couple of seconds after each call.OutlookEX.au3 (1831) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
$aOL_Items[$iOL_Counter][$iOL_Index - 1] = $oOL_Item.ItemProperties.Item($aOL_ReturnProperties[$iOL_Index] ).value
^ ERROR
Posted 21 March 2011 - 07:44 AM
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
0 members, 0 guests, 0 anonymous users