water Posted March 23, 2017 Author Posted March 23, 2017 I think this WAD. Because you are the one who sends the mail - but in the name of another user. If you want a copy of the sent mail in the sent folder of the other mailbox you need to copy the mail item. 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
4bst1n3nz Posted March 23, 2017 Posted March 23, 2017 $aItems = _OL_ItemFind($oO, "*\Sent", $olMail, "[From]='Test' And [Subject]='Testt'", "", "", "Subject", "", 1) I try to find the Item by the senders name and the subject. But i'm doing something wrong. I got the information from msdn. It seems like its different.
water Posted March 23, 2017 Author Posted March 23, 2017 What is the value of @error and @extended after you called the function? 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 March 23, 2017 Author Posted March 23, 2017 Should be $aItems = _OL_ItemFind($oO, "*\Sent", $olMail, "[SenderName]='Test' And [Subject]='Testt'", "", "", "Subject", "", 1) 4bst1n3nz 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
HighlanderSword Posted March 24, 2017 Posted March 24, 2017 Hello Water, New question for you , I have a secondary PST folder open in outlook. I have an exiting Folder Called Microsoft, I now want to add subfolders underneath Microsoft I tried the below and it errors out . Global $oOutlook = _OL_Open() Global $oFolder = _OL_PSTAccess($oOutlook, "D:\Test.pst") _OL_FolderCreate($oOutlook, "\Microsoft\Issues", $olFolderInbox, $ofolder)
water Posted March 24, 2017 Author Posted March 24, 2017 When you search the forum for posts where I ask users for more information to track down an issue, what do I ask 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
HighlanderSword Posted March 24, 2017 Posted March 24, 2017 Using Outlook 2013 and the latest and Greatest Version of your UDF Error code = 5 Extended = -2147024809
water Posted March 24, 2017 Author Posted March 24, 2017 Use: Global $oOutlook = _OL_Open() Global $oFolder = _OL_PSTAccess($oOutlook, "D:\Test.pst") _OL_FolderCreate($oOutlook, "Microsoft\Issues", $olFolderInbox, $ofolder) 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
HighlanderSword Posted March 24, 2017 Posted March 24, 2017 It errors out with Code 4 indicating the folder already Exists, the only part that exists is the parent folder Name Microsoft , no sub folders are their yet
water Posted March 24, 2017 Author Posted March 24, 2017 Then replace $oFolder with the name of the store as displayed in the folder pane and add a trailing "\Microsoft". Global $oOutlook = _OL_Open() Global $oFolder = _OL_PSTAccess($oOutlook, "D:\Test.pst") _OL_FolderCreate($oOutlook, "Issues", $olFolderInbox, "Test\Microsoft") 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
TOTOTO Posted April 11, 2017 Posted April 11, 2017 Hi water, Thanks for the fantastic UDF. I just started to use it 2 weeks ago and already loved it. One question about keeping the signature when modify the body: Is it still working in Outlook 2016? I tried with the example in your wiki page, tried all 3 types of body format, but unfortunately, none of them work. The signature is gone right after I added the content. I tried to add a ConsoleWrite after save the body into $sBody: #include <OutlookEX.au3> Global $oOutlook = _OL_Open() ;=========== ; Plain Text ;=========== $oItem = _OL_ItemCreate($oOutlook, $olMailItem, "", "", "Subject=Subject for BodyFormat=Plain Text") $oItem.BodyFormat = $olFormatPlain $oItem.GetInspector $sBody = $oItem.Body $oItem.Body = "Text: Mail Text" & $sBody $oItem.Display But the Console only writes "Saved body", seems like the sBody does not get anything from the mail. Confirmed the mail does contain a signature by adding $oItem.Display and sleep(3000) before " $sBody = $oItem.Body" line. Not to sure how to debug this, please help. Thanks a lot!
water Posted April 11, 2017 Author Posted April 11, 2017 Glad you like the UDF I'm running Outlook 2010 and the example script you posted above works just fine. Can you please post the script YOU run (including ConsoleWrite Statements etc.)? 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
TOTOTO Posted April 11, 2017 Posted April 11, 2017 Hi water, Thanks for the reply. Below is the code I used for test: #include <OutlookEX.au3> Global $oOutlook = _OL_Open() $oItem = _OL_ItemCreate($oOutlook, $olMailItem, "", "", "Subject=Subject for BodyFormat=RTF") $oItem.BodyFormat = $olFormatRichText ;$oItem.GetInspector $sBody = $oItem.HTMLBody $oItem.Display Sleep(3000) ConsoleWrite( "Following is the body saved: " & @CRLF & $sBody & @CRLF ) $oItem.HTMLBody = "RTF: <b>Mail</b> Text" & $sBody Since I insert the $oItem.Display before sleep(3000), so I can see the signature is there in the mail body. But after 3 seconds, the mail body changed to only one line "RTF: Mail Text" without signature. The Console only writes "Following is the body saved: " and an empty line.
water Posted April 12, 2017 Author Posted April 12, 2017 Seems to be a problem with Outlook 2016. I only have Outlook 2010 and your script works fine here. 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
TOTOTO Posted April 13, 2017 Posted April 13, 2017 18 hours ago, water said: Seems to be a problem with Outlook 2016. I only have Outlook 2010 and your script works fine here. Thanks for the testing. Too bad, can't downgrade the version of Outlook on the company notebook. Do you have plan to make this working on Outlook 2016 anytime soon?
water Posted April 13, 2017 Author Posted April 13, 2017 As soon as I know how to solve this problem I will implement it. But unfortunately I have been unable to find any information about this problem nor a solution on the web. If you do, please let me know 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
TOTOTO Posted April 13, 2017 Posted April 13, 2017 Thanks water. Is there any kind of debug that I can run on my side to help you investigate the issue?
water Posted April 13, 2017 Author Posted April 13, 2017 At the moment I have no idea. I searched the web and didn't find a hint how to solve this problem. If you find some code snippets for Outlook 2016 I should be able to translate them to AutoIt. 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
TOTOTO Posted April 18, 2017 Posted April 18, 2017 On 13/04/2017 at 5:45 PM, water said: At the moment I have no idea. I searched the web and didn't find a hint how to solve this problem. If you find some code snippets for Outlook 2016 I should be able to translate them to AutoIt. Sorry, I'm totally outsider for outlook. Have no idea about how to collect code snippets. Looks like have to wait someone else can help this part.
Recommended Posts