seadoggie01 Posted January 7, 2020 Posted January 7, 2020 Thank you water! That worked great as always. It seems that _OL_ItemRecipientCheck doesn't work when passing an array of names to be resolved. There is a check to see if $sP1 is blank when stripped of whitespace before the check for an array. It looks like the check should be made 2 lines later than it is currently All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types
water Posted January 7, 2020 Author Posted January 7, 2020 I had a quick look and think it is a bug. Will be fixed 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
Ostap Posted January 9, 2020 Posted January 9, 2020 (edited) Hi, I am aiming to add a basic button to Outlook GUI, and now experimenting with OutlookEXGUI. My test script is listing attachments of currently selected e-mail: #include <OutlookEx.au3> #include <OutlookEXGUI.au3> #include <Array.au3> $Outlook = _OL_Open() $Email = _OL_FolderSelectionGet ( $Outlook ) $Attachments = _OL_ItemAttachmentGet ( $Outlook, $Email[1][1] ) _ArrayDisplay ( $Attachments ) _OL_BarGroupAdd ( $Outlook, "Test", 1 ) _OL_Close( $Outlook ) Attachment part works fine, but _OL_BarGroupAdd seem not change anything in the Outllok client (Office 365 ProPLus, build 1902). What I am missing? ================= Found out that it works but I was expecting different output. I wanted to get a group of symbols on the ribbon. Edited January 9, 2020 by Ostap
water Posted January 9, 2020 Author Posted January 9, 2020 Does the _OL_OutlookBarAdd.au3 example script work for you? If not, do you get an error 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
Ostap Posted January 10, 2020 Posted January 10, 2020 It works. I wanted to delete my post but didn't find how
water Posted January 10, 2020 Author Posted January 10, 2020 You can't delete posts. AFAIK you can modify the ribbon. But it is far more complex. 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
water Posted January 10, 2020 Author Posted January 10, 2020 @seadoggie01 I changed the function like this. You now always get an error message when the first recipient is empty. Be it from the first parameter being a string or an array. expandcollapse popup; #FUNCTION# ==================================================================================================================== ; Name ..........: _OL_ItemRecipientCheck ; Description ...: Checks one/more recipients to be valid. ; Syntax.........: _OL_ItemRecipientCheck($oOL, $vP1[, $sP2 = ""[, $sP3 = ""[, $sP4 = ""[, $sP5 = ""[, $sP6 = ""[, $sP7 = ""[, $sP8 = ""[, $sP9 = ""[, $vP10 = ""[, $bOnlyValid = False[, $bStrict = True]]]]]]]]]]]) ; Parameters ....: $oOL - Outlook object returned by a preceding call to _OL_Open() ; $vP1 - Name, Alias or SMTP mail address of one or multiple recipients separated by ";" ($sP2 to $vP10 are ignored if ";" is used) ; +or a zero based one-dimensional array with unlimited number of recipients ; $sP2 - Optional: Name, Alias or SMTP mail address of a single recipient (no concatenation of recipients using ";" allowed) ; $sP3 - Optional: Same as $sP2 ; $sP4 - Optional: Same as $sP2 ; $sP5 - Optional: Same as $sP2 ; $sP6 - Optional: Same as $sP2 ; $sP7 - Optional: Same as $sP2 ; $sP8 - Optional: Same as $sP2 ; $sP9 - Optional: Same as $sP2 ; $vP10 - Optional: Same as $sP2 ; $bOnlyValid - Optional: Only return the resolved recipient objects in a one-dimensional zero based array (default = False) ; $bStrict - Optional: Does a strict and not just a left to right comparison. Please see Remarks (default = True) ; Return values .: Success - two-dimensional one based array with the following information (for $bOnlyValid = False): ; |0 - Recipient derived from the list of recipients in $vP1 ; |1 - True if the recipient could be resolved successfully ; |2 - Recipient object as returned by the Resolve method ; |3 - AddressEntry object ; |4 - Recipients mail address (empty for distribution lists). This can be: ; | PrimarySmtpAddress for an Exchange User ; | Email1Address for an Outlook contact ; | Empty for Exchange or Outlook distribution lists ; |5 - Display type is one of the OlDisplayType enumeration that describes the nature of the recipient ; |6 - Display name of the recipient ; Success - one-dimensional zero based array with the following information (for $bOnlyValid = True): ; |0 - Recipient object which was successfully resolved by the Resolve method. Unresolveable recipients are not part of the result! ; | @extended holds the number of unresolved recipients. ; Failure - Returns "" and sets @error: ; |1 - $oOL is not an object ; |2 - $vP1 is empty or the first element of the array passed with $vP1 is empty ; |3 - Error creating recipient object. @extended contains the error returned by method CreateRecipient ; Author ........: water ; Modified ......: ; Remarks .......: When $bOnlyValid = True you get a one-dimensional zero based array with all invalid recipients removed. ; This array can easily be passed to _OL_ItemRecipientAdd. ; @extended holds the number of unresolved recipients. ; | ; Outlook compares the recipient from left to right with the address book. This means Outlook might find more than one recipient even when they ; are different e.g."John Doe" could be resolved to "John Doe" and "John Doerler". ; When $bStrict = True then the recipient is prependet with "=" so a strict comparison is used e.g. "=John Doe". ; Related .......: ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== Func _OL_ItemRecipientCheck($oOL, $vP1, $sP2 = "", $sP3 = "", $sP4 = "", $sP5 = "", $sP6 = "", $sP7 = "", $sP8 = "", $sP9 = "", $vP10 = "", $bOnlyValid = False, $bStrict = True) If $bOnlyValid = Default Then $bOnlyValid = False If $bStrict = Default Then $bStrict = True Local $oRecipient, $asRecipients[10], $iIndex2, $iUnresolved = 0 If Not IsObj($oOL) Then Return SetError(1, 0, "") ; Move recipients into an array If Not IsArray($vP1) Then If StringInStr($vP1, ";") > 0 Then $asRecipients = StringSplit($vP1, ";", 2) Else $asRecipients[0] = $vP1 $asRecipients[1] = $sP2 $asRecipients[2] = $sP3 $asRecipients[3] = $sP4 $asRecipients[4] = $sP5 $asRecipients[5] = $sP6 $asRecipients[6] = $sP7 $asRecipients[7] = $sP8 $asRecipients[8] = $sP9 $asRecipients[9] = $vP10 EndIf Else $asRecipients = $vP1 EndIf If StringStripWS($asRecipients[0], 3) = "" Then Return SetError(2, 0, "") ; <== Moved this line If $bOnlyValid Then Local $asResult[UBound($asRecipients, 1)] $iIndex2 = 0 Else Local $asResult[UBound($asRecipients, 1) + 1][7] ; = [[UBound($asRecipients, 1), 7]] $iIndex2 = 1 EndIf For $iIndex = 0 To UBound($asRecipients, 1) - 1 If StringStripWS($asRecipients[$iIndex], 3) = "" Or $asRecipients[$iIndex] = Default Then ContinueLoop If Not $bOnlyValid Then $asResult[$iIndex2][0] = $asRecipients[$iIndex] If $bStrict And StringLeft($asRecipients[$iIndex], 1) <> "=" Then $oRecipient = $oOL.Session.CreateRecipient("=" & $asRecipients[$iIndex]) Else $oRecipient = $oOL.Session.CreateRecipient($asRecipients[$iIndex]) EndIf If @error Or Not IsObj($oRecipient) Then Return SetError(3, @error, "") $oRecipient.Resolve If @error Or Not $oRecipient.Resolved Then If $bOnlyValid Then $iUnresolved = $iUnresolved + 1 ; Count unresolved recipients ContinueLoop EndIf $asResult[$iIndex2][1] = False Else If $bOnlyValid Then $asResult[$iIndex2] = $oRecipient Else $asResult[$iIndex2][1] = True $asResult[$iIndex2][2] = $oRecipient Switch $oRecipient.AddressEntry.AddressEntryUserType ; Exchange user that belongs to the same or a different Exchange forest Case $olExchangeUserAddressEntry, $olExchangeRemoteUserAddressEntry $asResult[$iIndex2][3] = $oRecipient.AddressEntry.GetExchangeUser $asResult[$iIndex2][4] = $oRecipient.AddressEntry.GetExchangeUser.PrimarySmtpAddress ; Address entry in an Outlook Contacts folder Case $olOutlookContactAddressEntry $asResult[$iIndex2][3] = $oRecipient.AddressEntry.GetContact $asResult[$iIndex2][4] = $oRecipient.AddressEntry.GetContact.Email1Address ; Address entry in an Exchange Distribution list Case $olExchangeDistributionListAddressEntry $asResult[$iIndex2][3] = $oRecipient.AddressEntry.GetExchangeDistributionList ; Address entry in an an Outlook distribution list Case $olOutlookDistributionListAddressEntry $asResult[$iIndex2][3] = $oRecipient.AddressEntry Case Else EndSwitch $asResult[$iIndex2][5] = $oRecipient.DisplayType $asResult[$iIndex2][6] = $oRecipient.Name If StringLeft($asResult[$iIndex2][6], 1) = "=" Then $asResult[$iIndex2][6] = StringMid($asResult[$iIndex2][6], 2) EndIf EndIf $iIndex2 = $iIndex2 + 1 Next If $bOnlyValid Then ReDim $asResult[$iIndex2] Else ReDim $asResult[$iIndex2][7] $asResult[0][0] = $iIndex2 - 1 $asResult[0][1] = 7 EndIf Return SetError(0, $iUnresolved, $asResult) EndFunc ;==>_OL_ItemRecipientCheck seadoggie01 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
guidok Posted January 14, 2020 Posted January 14, 2020 (edited) Hello, I can create an appointment item with start date/time and duration. ; Create an appointment and set some properties $oItem = _OL_ItemCreate($oOL, $olAppointmentItem, "*\Kalender", "", "Subject=HomeOffice " & @UserName & ": " & GUICtrlRead($InputWhy), "Start=" & GUICtrlRead($MonthCal) & " " & GUICtrlRead($InputBeginHO), "Duration=480", "MeetingStatus=1") This works perfect. But now I have to create an all day appointment item. Can I create an all-day appointment item with OutlookEx-UDF? How do I do this? I searched the files OutlookEx.au3 and OutlookExConstants.au3, but I didn't find anything that would help me to do so. Thanks in Advance, Guido I found the solution while trying the last time: you have to add another parameter/value called AllDayEvent=1!!! $oItem = _OL_ItemCreate($oOL, $olAppointmentItem, "*\Kalender", "", "Subject=HomeOffice " & @UserName & ": " & GUICtrlRead($InputGrund) & "/" & GUICtrlRead($InputBeginHO), "Start=" & GUICtrlRead($MonthCal) , "", "MeetingStatus=1", "AllDayEvent=1") Edited January 14, 2020 by guidok Found the solution
seadoggie01 Posted January 23, 2020 Posted January 23, 2020 I'm not sure how intended this is or how much is Outlook, but Recipient objects returned by _OL_ItemRecipientCheck have a leading equals sign in their names and email addresses. It looks strange when attempting to build a Distribution list All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types
water Posted January 23, 2020 Author Posted January 23, 2020 That‘s a bug. It has already been fixed but no new version of the UDF has been released since. I think I have posted the solution on the forum lately. Let me know if you can’t find it. I’m not at my computer right now. seadoggie01 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
water Posted January 26, 2020 Author Posted January 26, 2020 Can you please post an example so I can play with it? I had a look at the UDF and think the bug has already been fixed in the latest version 1.4.0.0 🤔 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
seadoggie01 Posted January 27, 2020 Posted January 27, 2020 Sure... when $bFail is true, there will be an equals sign in the name of the recipient in the distribution list and in their email. (I removed error checking, but it ran for me) Spoiler #include <OutlookEX.au3> OutlookTest() Func OutlookTest() Local $bFails = True Local Const $sEmail = "<My Email>" ; Open Outlook Local $oOL = _OL_Open() ; Get the folder Local $aContactsFld = _OL_FolderAccess($oOL, "Public Folders - " & $sEmail & "\All Public Folders\<Longish Folder Name>\", $olFolderContacts) ; Create a Distribution list (contact group) Local $oDistGroup = _OL_ItemCreate($oOL, $olDistributionListItem, $aContactsFld[1], "") ; Add a name and category to it _OL_ItemModify($oOL, $oDistGroup, $aContactsFld[3], "DLName=test", "Categories=~ Contact Groups ~") ; Create a recipient to add to the new list Local $aRecipient = _OL_ItemRecipientCheck($oOL, $sEmail, Default, Default, Default, Default, Default, Default, Default, Default, Default, Default, $bFails) ; Add the recipeint to the list _OL_DistListMemberAdd($oOL, $oDistGroup, $aContactsFld[3], $aRecipient[1][2]) ; Look at it $oDistGroup.Display() Sleep(10000) ; Delete it _OL_ItemDelete($oOL, $oDistGroup, $aContactsFld[3], True) EndFunc All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types
water Posted January 27, 2020 Author Posted January 27, 2020 I have removed all other lines from your script and only called _OL_ItemRecipientCheck for a SMTP address (john.doe@gmx.com) and my Exchange account (firstname lastname). Can you please insert a _Arraydisplay($aRecipient) after _OL_ItemRecipientCheck in your script? Do you still see a leading equals sign? 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
seadoggie01 Posted January 28, 2020 Posted January 28, 2020 No, there is no leading equals sign there, which was what seemed strange to me... the recipient is resolved and everything looks good, but when I add the recipient to the distribution list, they are shown with a leading equals sign All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types
water Posted January 28, 2020 Author Posted January 28, 2020 I have just run the _OL_DistListMemberAdd.au3 example script. No equal signs! Could you please run the example script yourself? You are sure to run the lastest version of the OutlookEX UDF? 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
seadoggie01 Posted January 28, 2020 Posted January 28, 2020 (edited) So that doesn't create the issue... but if you change example #2 to this it works the way I'm seeing it... Global $sRecipient = InputBox("OutlookEX UDF: _OL_DistListMemberAdd Example Script","Please enter name of recipient to be added to the distribution list") Global $oOL_Recipient = _OL_ItemRecipientCheck($oOutlook, $sRecipient, Default, Default, Default, Default, Default, Default, Default, Default, Default, Default, True)[1][2] ;<-- Get the recipient object (assumes it works) $oItem = _OL_DistListMemberAdd($oOutlook, $aOL_Item[1][0], Default, $oOL_Recipient) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_DistListMemberAdd Example Script", "Error adding member to distribution list in folder 'Outlook-UDF-Test\SourceFolder\Contacts'. @error = " & @error & ", @extended = " & @extended) ; Display item $oItem.Display MsgBox(64, "OutlookEX UDF: _OL_DistListMemberAdd Example Script", "Member successfully added to distribution list!") _OL_Close($oOutlook) It appears to have something to do with _OL_ItemRecipientCheck combined with _OL_DistListMemberAdd Edit: I forgot, yes, the Outlook version I have is 1.4.0.0... the modified date says July 24, 2019 however. I'll redownload it just to be sure. Edit 2: Yup, still modified in July. I have the latest version Edited January 28, 2020 by seadoggie01 All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types
water Posted January 30, 2020 Author Posted January 30, 2020 Will check as soon as 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
water Posted January 31, 2020 Author Posted January 31, 2020 I was able to reproduce the problem when I add a SMTP address (e.g. john.doe@gmx.com) to the distribution list. Exchange addresses (e.g. "John Doe") work fine. Will investigate what causes the problem! 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
water Posted January 31, 2020 Author Posted January 31, 2020 Solution is to not do a strict check for SMTP addresses (doesn't make sense anyway). So please replace the following line in function _OL_RecipientCheck: If $bStrict And StringLeft($asRecipients[$iIndex], 1) <> "=" Then with If $bStrict And StringLeft($asRecipients[$iIndex], 1) <> "=" And StringInStr($asRecipients[$iIndex], "@") = 0 Then ; $bStrict is ignored for SMTP-addresses If it works for you I will add this to the next release of the UDF. 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
seadoggie01 Posted February 3, 2020 Posted February 3, 2020 Yes, that works for me I also discovered a bug in _OL_ItemRecipientDelete... kinda... basically it goes like this: Step 1: Use _OL_ItemRecipientGet to retrieve the recipients of an email Step 2: Loop through and determine which ones to remove, collecting their index (1, 3, 5, 7, 9) Step 3: Pass these to _OL_ItemRecipientDelete, which will delete items (1, 4, 7, 10, 13) which is (1+0, 3+1, 5+2, 7+3, 9+4) This happens because Outlook recalculates the position of each recipient after a recipient is deleted... to fix it you could do something like this: ;<-- Snipped _OL_ItemRecipientDelete initial setup --> ; Delete recipients from the item For $iIndex = 0 To UBound($aRecipients) - 1 If StringStripWS($aRecipients[$iIndex], 3) = "" Or $aRecipients[$iIndex] = Default Then ContinueLoop ; Below line subtracts index to correctly re-calculate position after removal $vItem.Recipients.Remove($aRecipients[$iIndex] - $iIndex) If @error Then Return SetError(3, $iIndex, 0) Next $vItem.Save() Return $vItem EndFunc ;==>_OL_ItemRecipientDelete All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types
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