water Posted September 13, 2017 Author Share Posted September 13, 2017 The possible error codes are documented in the header of the respective function in the UDF - or in the help file that comes with the download. Skysnake 1 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...
Skysnake Posted September 13, 2017 Share Posted September 13, 2017 Got it. Tips on RTF mail format? Skysnake Skysnake Why is the snake in the sky? Link to comment Share on other sites More sharing options...
water Posted September 13, 2017 Author Share Posted September 13, 2017 RTF mail format: Works as Text or HTML format. I prefer HTML because it is much easier to format the mail body. 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...
Skysnake Posted September 13, 2017 Share Posted September 13, 2017 Is it possible to provide an example of using an RTF body? I do this for HTML and it works. RTF does not work. $hFileOpen = FileOpen("C:\wwweb\backgroundColors\Background_Text_Colors.rtf") $HTMLBody = FileRead($hFileOpen) FileClose($hFileOpen) $olFormatRichText So I read the file content and place that into the email request. $olFormatHTML for HTML file works as expected. $olFormatRichText for RTF does not. I see the raw RTF tags. Suggestions? Skysnake Skysnake Why is the snake in the sky? Link to comment Share on other sites More sharing options...
water Posted September 13, 2017 Author Share Posted September 13, 2017 I have never used RTF. What I found on the web makes me think that it is quite complex - to say the least. The thread is quite old but I think RTF is not supported and was introduced by "accident". I tried and did not get a useful result: #include <OutlookEX.au3> Global $oOL = _OL_Open() _OL_ErrorNotify(2) $oItem = _OL_ItemCreate($oOL, $olMailItem, "*", "", "Subject=TestMail", "BodyFormat=" & $olFormatRichText) $oItem.Body = "{\rtf1\ansi\deff0{\fonttbl{\f0 Arial;}}{\colortbl ;\red0\green0\blue255;}\pard\cf1\f0\fs24 Test}" $oItem.Display() 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...
Skysnake Posted September 13, 2017 Share Posted September 13, 2017 Same here. Thanks. Skysnake Why is the snake in the sky? Link to comment Share on other sites More sharing options...
Skysnake Posted September 13, 2017 Share Posted September 13, 2017 gmail is a problem. When I send with my Outlook client I can attach a PDF attachment is which displayed correctly in gmail. However, when I attach the same PDF with the Outlook UDF the attachment gets renamed to "noname" with no extension. When I download and open with Acrobat it works, it is obviously the correct attachment in the correct format, just the file.name gets stripped off. A formatting issue maybe? Skysnake Skysnake Why is the snake in the sky? Link to comment Share on other sites More sharing options...
water Posted September 13, 2017 Author Share Posted September 13, 2017 Function _OL_ItemAttachmentAdd allows to specify the Displayname for an attachment. Does this help? 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...
water Posted September 13, 2017 Author Share Posted September 13, 2017 When you search the web for "gmail attachment noname" you get a lot of hits. Seems it is a problem with gmail Skysnake 1 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...
Skysnake Posted September 13, 2017 Share Posted September 13, 2017 Thank you for all of this. Perhaps in the documentation a section on "Known issues" - it reminds me of jchd's opinion on CSV format - the issues with sending email are plenty, and not really an actual standard... Thank you very much for all of this. Skysnake Skysnake Why is the snake in the sky? Link to comment Share on other sites More sharing options...
water Posted September 13, 2017 Author Share Posted September 13, 2017 Section has been added to the wiki Skysnake 1 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...
water Posted September 13, 2017 Author Share Posted September 13, 2017 On 12.9.2017 at 9:31 AM, Skysnake said: Your documentation is good. I do however have this suggestion: Make a __Example.au3 file to run first, with the basics? Yes, I found all the examples, but the problem is, Where to start? I know the OutlookEX UDF has a lot of functions covering most of what Outllok is capable. I tried to explain the concepts of the UDF in the wiki. Where to start depends on what you try to achieve. When I coded the UDF I created a kind of cross reference. Would this be helpful for newbies? Skysnake 1 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...
Skysnake Posted September 13, 2017 Share Posted September 13, 2017 Very nice The colors mean? Skysnake Why is the snake in the sky? Link to comment Share on other sites More sharing options...
water Posted September 13, 2017 Author Share Posted September 13, 2017 Green: The function on the left (e.g. ItemAttachmentAdd) can be used with the item type in the marked column (e.g. mail and task). 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...
Gianni Posted October 10, 2017 Share Posted October 10, 2017 (edited) Hi, I'm trying to access (all) items (emails) that are stored in the root of a separate pst opened in outlook. I get a refernce to that pst by using _OL_PSTAccess() with no errors but then I fail on trying to get items from the above pst by using _OL_ItemFind() here is my failing attempt: $oOL = _OL_Open() ; Connect or start up Outlook ConsoleWrite("Debug: Outlook Open: " & @error & @CRLF) ; no errors $oOtherPST = _OL_PSTAccess($oOL, 'c:\temp\Another.pst') ; Access the other pst ConsoleWrite("Debug: Access PST: " & @error & @TAB & @extended & @CRLF) ; no errors $aItems = _OL_ItemFind($oOL, $oOtherPST, $olMail, "", "", "", "EntryID,Subject", "", 1) ; <-- ??? how to reference $oOtherPST ?? ConsoleWrite("Debug: Item Find: " & @error & @TAB & @extended & @CRLF) ; --> @error=4 @extended=1 please, could you show me the right way to use _OL_ItemFind() in this case? Thanks Edited October 10, 2017 by Chimp Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
water Posted October 10, 2017 Author Share Posted October 10, 2017 Will have a look tomorrow when I return to my office. 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...
water Posted October 11, 2017 Author Share Posted October 11, 2017 Just tested your script here and it works as expected. Could you please modify the _OL_ItemFind statement? $aItems = _OL_ItemFind($oOL, $oOtherPST, $olMail, "", "", "", "EntryID", "", 1) Gianni 1 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...
Gianni Posted October 11, 2017 Share Posted October 11, 2017 Hi water, Thanks for you reply I've used the line as you posted here above (removed the "Subject" field) but I get still the same error. P.S. BTW If I use instead the _OL_ItemFind() function on the "main" pst recalling emails from a folder of the main folder tree on the left pane of outlook (example using something like "*\foldername" in the second parameter of the _OL_ItemFind function) , then I get items correctly. Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Gianni Posted October 11, 2017 Share Posted October 11, 2017 @water ... wait a moment... I've found where is the problem If there is an opened "reminder" popup window, the _OL_ItemFind function doesn't works on other pst, while it works instead on the main pst. .. strange Behaviour, but seems that is like this. Well, thanks a lot anyway water for your help, I have now though a new question: How can I select subfolders from the external pst? If I use the $oOtherPST variable in the second parameter, how can I add the string of the subfolder path?? Thanks in advance for any tips Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
water Posted October 11, 2017 Author Share Posted October 11, 2017 Something like this: #include <OutlookEX.au3> $oOL = _OL_Open() ; Connect or start up Outlook ConsoleWrite("Debug: Outlook Open: " & @error & @CRLF) ; no errors $oOtherPST = _OL_PSTAccess($oOL, 'c:\temp\Test.pst') ; Access the other pst ConsoleWrite("Debug: Access PST: " & @error & @TAB & @extended & @CRLF) $aFolder = _OL_FolderAccess($oOL, StringMid($oOtherPST.FolderPath, 3) & "\Gelöschte Objekte", Default, $olMailItem) ConsoleWrite("Debug: Folder Access: " & @error & @TAB & @extended & @CRLF) $aItems = _OL_ItemFind($oOL, $aFolder[1], $olMail, "", "", "", "EntryID,Subject", "", 1) ConsoleWrite("Debug: Item Find: " & @error & @TAB & @extended & @CRLF) _arraydisplay($aItems) _OL_PSTClose($oOL, $oOtherPST) Gianni 1 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