water Posted April 17, 2012 Author Share Posted April 17, 2012 All problems solved now? 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...
footswitch Posted April 17, 2012 Share Posted April 17, 2012 I believe I'm on the right track now. Many thanks. I don't want to keep nagging you without having a second look at things And of course fiddle with what I have so far. Link to comment Share on other sites More sharing options...
footswitch Posted April 18, 2012 Share Posted April 18, 2012 water, If Outlook isn't previously opened by the user, getting a Selection isn't a very good idea $oOL.ActiveExplorer.Selection.Count won't return a number in such case, and who knows in what other situations as well. So I suggest the following improvement, or something similar to improve the consistency of the element $Array[0][0]: Func _OL_FolderSelectionGet($oOL) Local $oOL_Selection = $oOL.ActiveExplorer.Selection Local $count = Int($oOL_Selection.Count) ; <== If 0 > $count Then $count = 0 ; <== and use $count from here on Local $aOL_Selection[$count + 1][3] = [[$count, 2]] For $iOL_Index = 1 To $count $aOL_Selection[$iOL_Index][0] = $oOL_Selection.Item($iOL_Index) $aOL_Selection[$iOL_Index][1] = $oOL_Selection.Item($iOL_Index).EntryId $aOL_Selection[$iOL_Index][2] = $oOL_Selection.Item($iOL_Index).Class Next Return $aOL_Selection EndFunc ;==>_OL_FolderSelectionGet Link to comment Share on other sites More sharing options...
water Posted April 18, 2012 Author Share Posted April 18, 2012 Thanks a lot for the suggestion. Will be included in the next version. 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...
Jaboowaki Posted April 18, 2012 Share Posted April 18, 2012 Hello, Can i get an example of sending an email with the signature. Thanks Link to comment Share on other sites More sharing options...
water Posted April 18, 2012 Author Share Posted April 18, 2012 Sure. Use functions _OL_MailSignatureCreate to create a new signature and _OL_MailSignatureSet to set a signature to be added to new email messages and/or when you reply to an email message. 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...
water Posted April 19, 2012 Author Share Posted April 19, 2012 (edited) Version 0.7.1.1 (Bugfixes) of the UDF has been released.Please test before using in production!For download please see my signature. Edited April 19, 2012 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...
LOULOU Posted April 20, 2012 Share Posted April 20, 2012 With new version 0.7.1.1 Bug , it's impossible to send a mail with OL_WRAPPER_SENDMAIL Error sending mail @error : 2002 @extended : 6 And with the old version 0.7.1 no problem Did you Know that's problem ? Thanks in advance Link to comment Share on other sites More sharing options...
water Posted April 20, 2012 Author Share Posted April 20, 2012 I wasn't aware of this problem. I will have a look at it this afternoon. Thanks for reporting. Looks like I opened a can of worms when I introduced the enhanced error checking 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...
water Posted April 20, 2012 Author Share Posted April 20, 2012 I just tried it here running the _OL_Wrapper_SendMail.au3 example script and it runs without problem. Can you please post how you call _OL_Wrapper_SendMail? 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...
LOULOU Posted April 20, 2012 Share Posted April 20, 2012 (edited) I use your standard example without any change , with exchange 2007 and vista french version pack 2. What is trange is that with old version there was no problem to send #AutoIt3Wrapper_AU3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=Y #include "OutlookEX.au3" #include "OutlookEXConstants.au3" $iOL_Debug = 2 Global $oOutlook =_OL_Open() ; ***************************************************************************** ; Example 1_OutlookSendMail ; 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", "<BR>Bodyfettnormal.","", $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 & "'!") Edited April 20, 2012 by LOULOU Link to comment Share on other sites More sharing options...
LOULOU Posted April 20, 2012 Share Posted April 20, 2012 (edited) I see that's even with error message the message go into "brouillon" folder only the subject is written , no body no receiver adressOthers questions :If the name of the receiver is not in Exchange how can i doexample : I want to send a mail to DUPONT Henri id.henri@toto.fr and dupont is not in my adress contact ?Thanks in advance Edited April 20, 2012 by LOULOU Link to comment Share on other sites More sharing options...
water Posted April 20, 2012 Author Share Posted April 20, 2012 After a lot of playing around I can recreate the problem with the buggy version 0.7.0. Can you please download version 0.7.1.1 again and make sure that there a no old versions of the UDF in the AutoIt include or the custom include directory? To check which version you access can you please run _OL_VersionInfo? 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...
LOULOU Posted April 20, 2012 Share Posted April 20, 2012 In fact that's what i do and after all is good except if i want to pass a name and an adress email of a contact which is not in my address contact I can do what i want. Can you help me to solve this problem i want to display and after to send a mil to a personn which is not in my contatc adress Link to comment Share on other sites More sharing options...
water Posted April 20, 2012 Author Share Posted April 20, 2012 (edited) I seem to lose track a bit Just to make sure: If you run _OL_Wrapper_SendMail.au3 as I deliver with the UDF the mail is sent to your mailbox? To send the mail to a recipient not in your address book simply replace $sCurrentUserwith"d.henri@toto.fr" Edited April 20, 2012 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...
LOULOU Posted April 20, 2012 Share Posted April 20, 2012 iT4S NOT POSSIBLE TO SEND LIKE THAT tO SEE NOT THE EMAIL ADRESS BUT THE NAME LIKE "TOTO<toto@toto;fr>" Link to comment Share on other sites More sharing options...
water Posted April 20, 2012 Author Share Posted April 20, 2012 (edited) Outlook accepts recipients as SMTP mail address (toto@toto.fr) or as names which need to be resolved using one of the address books. But as far as I understand it you can't combine it the way you showed in your previous post.According to Microsoft:"The name of the recipient; it can be a string representing the display name, the alias, or the full SMTP e-mail address of the recipient." Edited April 20, 2012 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...
footswitch Posted April 20, 2012 Share Posted April 20, 2012 Your latest release 0.7.1.1 seems to have fixed the issues I was having with unexpected error returns! Looking good! Link to comment Share on other sites More sharing options...
water Posted April 20, 2012 Author Share Posted April 20, 2012 I hope it stays that way The 0.7 update caused me a lot of headache. 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...
footswitch Posted April 20, 2012 Share Posted April 20, 2012 (edited) Oops. I believe you forgot about _OL_FolderAccess(). Isn't accepting a folder object.For me I just added this check before the main If clause:If IsObj($sOL_Folder) Then If $sOL_Folder.Class <> $olFolder Then Return SetError(1, 0, "") ; object is not a folder Else (...)Oh and _OL_ItemCopy(). When a destination folder isn't specified, use the folder of the source item.Added this If clause after the line Local $oOL_SourceFolder = $vOL_Item.ParentIf $vOL_TargetFolder == "" Then $vOL_TargetFolder = $oOL_SourceFolder Else If Not IsObj($vOL_TargetFolder) Then If StringStripWS($vOL_TargetFolder, 3) = "" Then $vOL_TargetFolder = $oOL_SourceFolder Local $aOL_Temp = _OL_FolderAccess($oOL, $vOL_TargetFolder) If @error Then Return SetError(2, @error, 0) $vOL_TargetFolder = $aOL_Temp[1] EndIf EndIfDon't be upset about the trouble it's been causing.Error checking in UDFs is a major help for a lot of us.Those of us who don't want it, probably will skip to the source anyway Edited April 20, 2012 by footswitch 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