water Posted July 9, 2015 Share Posted July 9, 2015 What I expected.You started Outlook as a normal user and can't access it when requireadmin is being used.So without requireadmin you get error = 4400 which means that there is a problem with the recipient. How did you specify the recipient? As a displayname (e.g. "GivenName LastName") or SMTP address (e.g. "GivenName.LastName@company.com")? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
tweakster2010 Posted July 9, 2015 Author Share Posted July 9, 2015 (edited) With Display name To is Blank and placed in draftWith Email address To is populated with email address but placed in draftWith requireadmin either way the script continues to run but never populates or errors out, just eventually closes. It does show @error 1 at the start. But now I am not replicating @error 4400 or @error 6002. >.> I dont know how I am no longer getting the error unless the script wasnt finishing ending when I had the requireadmin attached and forced me into those 2 errors? Maybe.... Kind of annoying LOLEDITI mean annoying I missed if that was still running in the background. I got so quick to test and try something new I didnt check my processes to see if it was still going. :/ Edited July 9, 2015 by tweakster2010 Link to comment Share on other sites More sharing options...
water Posted July 9, 2015 Share Posted July 9, 2015 Could you please run the _OL_Wrapper_SendMail.au3 example script? This should send a mail to your account.I'm sure this works as it has been tested here My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
tweakster2010 Posted July 9, 2015 Author Share Posted July 9, 2015 @error = 4400. Link to comment Share on other sites More sharing options...
tweakster2010 Posted July 9, 2015 Author Share Posted July 9, 2015 (edited) So here is a catch to my username, i have a pager line as well and that might be part of why its hanging as it sees me 2 times, one time as just my alias the other as my alias - pager. >.> But when I code straight for the e-mail address shoudlnt it just go with its only choice which is the full email address?EDIT UPDATEIf i change it from $sCurrentUser to my Email@emailaddress i get @error 6002. RequireAdmin just hangs either direction with it. when i do set the e-mail it does add the To field like i mentioned before so I think its struggling with Aliases. EDIT AGAINI tagged someone i know who doesnt have a multiple alias on their e-mail (someone without a pager account) and it works fine... So its the way it is recognizing I have my alias for email and my alias for pager account. Would you know a way to reduce it down to just pulling via e-mail and leaving alias out of it when I go to send the e-mail? That seems to be my catch. Edited July 9, 2015 by tweakster2010 Link to comment Share on other sites More sharing options...
water Posted July 9, 2015 Share Posted July 9, 2015 I have not found an automated way to do what you want.We could split _OL_Wrapper_SendMail into the single functions it consists of and if a recipient could not be resolved we could display a selection dialog for you to select the correct recipient.Would this be possible? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
tweakster2010 Posted July 9, 2015 Author Share Posted July 9, 2015 (edited) Ideally i would just reduce out the - pager aspect but another issue i found is this is mostly used for e-mail distribution groups that are in the GAL and I noticed it reports the same error. When I checked what it labeled it never applies the @emailgroup just the Display name which some groups are reduced in naming and can compare to a users first letters of their name. I am playing around with using Com Objects as well right now to do the same but getting a separator message on the Outlookobj.To section I have.Func EmailSupportR() Local $OutlookObj = ObjCreate("Outlook.Application") Local $MailObj = $OutlookObj.CreateItem(0) With $MailObj .To="myemail@email.com"; receiving "missing separator character before keyword. .Subject="Subject Testing" .Body="This is the body" .Display EndWith MsgBox(0,"tested","Testing object outlook useage") EndFuncThis is functional VB code my coworker wrote for emailing 1 person on a particular issue, so i know functionaly i can get it working on VB but rather focus on keeping it in Autoit as it has been my focus EDITcorrected thekeyboard to keyword (typo ahead of mind) Edited July 9, 2015 by tweakster2010 Link to comment Share on other sites More sharing options...
water Posted July 9, 2015 Share Posted July 9, 2015 The error message"missing separator character before keyword."is caused by a bug in Au3Check.Either download the latest beta version of Au3Check (link can be found on the forum when searching for the error message) or disable Au3Check for this script. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
tweakster2010 Posted July 9, 2015 Author Share Posted July 9, 2015 Tomorrow I will take a fresh look at this and start from scratch I jumped all over and lost myself. I started getting a parsing error if requireadmin was removed from teh new script but not on other scripts that dont have requireadmin. So its safe to say i need to stop for the day. Thank you tons! for the help. Lots of info to utilize and determine my next course of action with this issue Link to comment Share on other sites More sharing options...
tweakster2010 Posted July 9, 2015 Author Share Posted July 9, 2015 (edited) ok so i didnt step away instead I went ahead and finish it. Here is my end solution due to the hiccups with how we do things at my place of work vs your awesome tool water! Wish I could of used it for this 1 Here is my current working solutionexpandcollapse popupFunc EmailSupportR() ;UI $EmailSupport = GUICreate("Email Support", 578, 494, 220, 158) GUISetBkColor(0x008080) ;Check Boxes $EG1 = GUICtrlCreateCheckbox("EG1", 8, 8, 145, 17) $EG2 = GUICtrlCreateCheckbox("EG2", 8, 24, 105, 17) $EG3 = GUICtrlCreateCheckbox("EG3", 8, 40, 97, 17) $EG4 = GUICtrlCreateCheckbox("EG4", 8, 56, 97, 17) $EG5 = GuiCtrlCreateCheckbox("EG5", 8,72,97,17) $EG6 = GuiCtrlCreateCheckbox("EG6",160,72,97,17) $EG7 = GUICtrlCreateCheckbox("EG7", 160, 8, 105, 17) $EG8 = GUICtrlCreateCheckbox("EG8", 160, 24, 97, 17) $EG9 = GUICtrlCreateCheckbox("EG9", 160, 40, 97, 17) $EG10 = GUICtrlCreateCheckbox("EG10", 160, 56, 129, 17) ;Input fields in UI $TitleofEmail = GUICtrlCreateInput("", 8, 90, 553, 21) $BodyofEmail = GUICtrlCreateEdit("" , 8, 120, 561, 329, BitOR($ES_WANTRETURN, $WS_VSCROLL)) ;Buttons in UI $EmailSubmit = GUICtrlCreateButton("Submit", 152, 448, 75, 25) $emailexit = GUICtrlCreateButton("Exit", 248, 448, 75, 25) GuiSetState(@SW_Show) While 1 Sleep(10) Switch GuiGetMsg() Case $GUI_EVENT_CLOSE GuiDelete($EmailSupport) Return Case $emailexit GuiDelete($EmailSupport) Return Case $EmailSubmit Opt("WinTitleMatchMode", 2) ;Creates Outlook Object to access Local $aArrayGroups[0] Local $outobj = ObjCreate("Outlook.Application") ;creates email Local $mailobj = $outobj.CreateItem(0) ;while creating email submits the following information With $mailobj If _IsChecked($EG1) = True Then _ArrayAdd($aArrayGroups,"EG1@EG.com;") EndIf If _IsChecked($EG2) = True Then _ArrayAdd($aArrayGroups,"EG2@EG.com;") EndIf If _IsChecked($EG3) = True Then _ArrayAdd($aArrayGroups,"EG3@EG.com;") EndIf If _IsChecked($EG4) = True Then _ArrayAdd($aArrayGroups,"EG4@EG.com;") EndIf If _IsChecked($EG5) = True Then _ArrayAdd($aArrayGroups,"EG5@EG.com;") EndIf If _IsChecked($EG6) = True Then _ArrayAdd($aArrayGroups,"EG6@EG.com;") EndIf If _IsChecked($EG7) = True Then _ArrayAdd($aArrayGroups,"EG7@EG.com;") EndIf If _IsChecked($EG8) = True Then _ArrayAdd($aArrayGroups,"EG8@EG.com;") EndIf If _IsChecked($EG9) = True Then _ArrayAdd($aArrayGroups,"EG9@EG.com;") EndIf If _IsChecked($EG10) = True Then _ArrayAdd($aArrayGroups,"EG10@EG.com;") EndIf .To = StringReplace(_ArrayToString($aArrayGroups),"|", "") .Subject = GuiCtrlRead($TitleofEmail) .Body = GuiCtrlRead($BodyofEmail) .Display .Send EndWith EndSwitch WEnd EndFuncfixed a typo in th example Edited July 9, 2015 by tweakster2010 Link to comment Share on other sites More sharing options...
water Posted July 10, 2015 Share Posted July 10, 2015 At least you got it working I still need a way to cope with "unresolvable" recipients My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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