seadoggie01 Posted November 21, 2018 Posted November 21, 2018 That gives an Error:4 and Extended:1 (aka: root directory not found) (And wow, you're fast!) 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 November 21, 2018 Author Posted November 21, 2018 How about this (removed the trailing backslash): Global $aFolder = _OL_FolderAccess($objOutlook, "company.dept@company.org\Inbox") Now I have to leave so my next post will take some time 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 November 21, 2018 Posted November 21, 2018 (edited) Unfortunately, same thing. (No problem!!! The code works if I edit the OutlookEX.au3 file, I just want to be sure I'm not going to break any thing ) Edit: Have a happy thanksgiving! (I probably won't look until Monday) Edited November 21, 2018 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 November 21, 2018 Author Posted November 21, 2018 Can you please post the needed changes? Maybe I can enhance the UDF with this modifications 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 November 26, 2018 Posted November 26, 2018 I'm quite sorry... apparently everything is working again. I did try restarting last week, but apparently some turkey was all it took? Anyways, the VBA still throws the error but your code works great and throws no errors. I even re-installed your UDF to be sure. Thank you for all your help. 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 November 26, 2018 Author Posted November 26, 2018 Glad we got it working 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
ratjam Posted January 11, 2019 Posted January 11, 2019 I copied a mail forwarding script from this forum and tweaked it to work with my account. I am forwarding emails that are in a specific folder populated by rules. It is working great, except for 1 issue. When the email gets forwarded, 2 emails are created in my outbox. One is the email being forwarded - which is successful. The other stays in the outbox and is blank. How can I avoid or automatically remove these dummy emails? Thank you,
Developers Jos Posted January 11, 2019 Developers Posted January 11, 2019 @ratjam, I would change line 75 to the correct syntax to fix this. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
ratjam Posted January 16, 2019 Posted January 16, 2019 @Jos Line 75? The script I have has only 30 lines. Code is below. Thanks, ; Include Functions #include <OutlookEX.au3> Global $oForward, $sRecipient = "myemail@gmail.com" ; Connect to Outlook Global $oOutlook = _OL_Open() If @error <> 0 Then Exit MsgBox(16, "Connect to Outlook", "Error connecting to Outlook. @error = " & @error & ", @extended = " & @extended) ; Access correct mailbox Global $aFolder = _OL_FolderAccess($oOutlook, "*\SW_Reqs_In", $olFolderInbox) If @error <> 0 Then Exit MsgBox(16, "Folder access", "Error accessing the mailbox. @error = " & @error & ", @extended = " & @extended) ; Get unread items Global $aItems = _OL_ItemFind($oOutlook, $aFolder[1], $olMail, "[UnRead]=True", "", "", "EntryID,Subject,Body") If @error <> 0 Then Exit MsgBox(16, "Item find", "Error searching for unread mail items. @error = " & @error & ", @extended = " & @extended) ; Forward all unread mails For $i = 1 To $aItems[0][0] $oForward = _OL_ItemForward($oOutlook, $aItems[$i][0], Default, "") ; Create a copy of the item to forward If @error <> 0 Then Exit MsgBox(16, "Item forward", "Error creating an item copy to forward. @error = " & @error & ", @extended = " & @extended) _OL_ItemRecipientAdd($oOutlook, $oForward, Default, $olTo, $sRecipient) ; Add recipient If @error <> 0 Then Exit MsgBox(16, "Recipient add", "Error adding a recipient to the mail item. @error = " & @error & ", @extended = " & @extended) _OL_ItemSend($oOutlook, $oForward) ; Send the item to the recipient If @error <> 0 Then Exit MsgBox(16, "Item send", "Error sending the mail item. @error = " & @error & ", @extended = " & @extended) _OL_ItemMove($oOutlook, $aItems[$i][0], Default, "*\SW_Reqs_Out") ; Move to OUT folder If @error <> 0 Then Exit MsgBox(16, "Item forward", "Error creating an item copy to forward. @error = " & @error & ", @extended = " & @extended) Next ; Close connection to Outlook _OL_Close($oOutlook)
water Posted January 19, 2019 Author Posted January 19, 2019 Which version of Outlook do you run? Do you get the same result (additional item in the Outbox) when you run the _OL_ItemForward.au3 example script? 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
haihi2 Posted January 25, 2019 Posted January 25, 2019 hello Water, wonder how to add the outlookex function to Scite help file? I usually check help file, it very convenient but don't see the _ol_... in help file. I'm using v3.3.12.0 Thanks!
water Posted January 25, 2019 Author Posted January 25, 2019 Unfortunately there is no way to include the OutlookEx documentation into the AutoIt CHM documentation. You can integrate the OutlookEx UDF into SciTE by using the SciTEConfig tool (press Ctrl+1), select tab "Other tools", "Run User Calltip Manager" and then process the OutlookEX UDF. For a full help file you need to open the UDF and check the source or open OutlookEx.htm (comes with the OutlookEx zip-file). haihi2 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
gigahacker Posted February 7, 2019 Posted February 7, 2019 All, I am not a programmer but I play one when needed. I have written a bunch of small autoit scripts but I am having trouble with this one. OutlookEX UDF - I have written and script to send e-mails (at work) to request 400 license files. One every 10 seconds (server limits). The issue is only my boss can request them. If he is not in, no one else can run the script. I have in my outlook a "send as" option to send a request as him. This is NOT a different account nor is it a "Send on Behalf of" it is a "Send As". This works as a "Send on Behalf of" but can't find code to "Send As" #include <OutlookEx.au3> ; Open the connection to Outlook Global $oOL = _OL_Open() ; Create a mail item and set some properties Global $oItem = _OL_ItemCreate($oOL, $olMailItem, "", "", "Subject=TestMail", "BodyFormat=" & $olFormatHTML, "HTMLBody=Bodytext in <b>bold</b>.", "SentOnBehalfOfName=Last_him, First_Him [EXP] xxx/US") ; Add a recipient and resolve it _OL_ItemRecipientAdd($oOL, $oItem, Default, $olTo, "Last, First [EXP] xxx/US") ; Send the mail _OL_ItemSend($oOL, $oItem) If @extended = -2147352567 Then _ MsgBox(16, "OutlookEX UDF - Example Script", "You don't have permission to send the mail on behalf of the specified person!") _OL_Close($oOL)
water Posted February 7, 2019 Author Posted February 7, 2019 Never tried it myself but I think the Sender or SendUsingAccount properties should do what you are looking for. 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
Skysnake Posted February 11, 2019 Posted February 11, 2019 I have a similar problem. But not as fancy as yours. Simply multiple email accounts, for private and business use. How to select a specific account to send on? I have not yet been able to force this. Please post if you find a solution. I seems that it has to do with the selected profile. Skysnake Why is the snake in the sky?
water Posted February 11, 2019 Author Posted February 11, 2019 Have you tried the Sender or SendUsingAccount properties I posted above? 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 February 11, 2019 Author Posted February 11, 2019 Quite easy #include <OutlookEX.au3> Global $oItem Global $oOutlook = _OL_Open() _OL_ErrorNotify(2) $oItem = _OL_ItemCreate($oOutlook, $olMailItem, "", "", "Subject=TestMail", "Body=TestBody") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemCreate Example Script", "Error creating mail. @error = " & @error & ", @extended = " & @extended) $oItem = _OL_ItemRecipientAdd($oOutlook, $oItem, Default, $olTo, "John.Doe@gmx.com") ; Recipient For $oAccount In $oOutlook.Session.Accounts If $oAccount.SMTPAddress = "mail.address@company.com" Then ; SMTP address of the desired sender $oItem.SendUsingAccount = $oaccount ExitLoop EndIf Next _OL_ItemSend($oOutlook, $oItem) _OL_Close($oOutlook) Skysnake 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 February 11, 2019 Author Posted February 11, 2019 I reinvented the wheel This has already been described in the wiki Skysnake 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
Skysnake Posted February 15, 2019 Posted February 15, 2019 But I could not get the WIKI example to work Thx Skysnake Why is the snake in the sky?
water Posted February 15, 2019 Author Posted February 15, 2019 So the example above works and the example in the wiki doesn't? Do you get any error messages from the wiki example? 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
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