water Posted February 1, 2012 Author Share Posted February 1, 2012 I will enhance _OL_FolderTree so you can specify how many levels of the folder hierarchy the function should return. This will save you the task to strip off unneeded subfolders. 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 Link to comment Share on other sites More sharing options...
Tjalve Posted February 2, 2012 Share Posted February 2, 2012 Im thinking perhaps i can use the local OST file as a refference, and then make the program check the size of the pst every 2 secounds or so. It should work. Link to comment Share on other sites More sharing options...
viraco Posted February 10, 2012 Share Posted February 10, 2012 Is it possible to open outlook using the UDF as a different user?Project Overview:AutoIT launches MS Access DB. (Complete)DB autoexec macro launches vba macro to extract and save query to excel file at location XXXX. (Complete)DB auto closes after macro runs. (Complete)AutoIT launches Outlook 2007 with username ########, password ########. (HELP Needed)AutoIT uses Outlook UDF EX to construct email, attach file, and send email to a distro. (Complete)AutoIT closes Outlook. (Complete)The part I'm wondering about is, for opening outlook, should it be launched using RUNAS, or is there a way for OUTLOOK UDF EX to do this.if RUNAS is needed then i can continue, but if the UDF can do it, then could someone please point me to the correct function?i already use the udf to cycle through a list of inboxes and get email counts.use the find function with added entry id, to get list of all emails in a folder and extract information to an mssql db.compare the found email items in a folder to items already in the database to get a count of unprocessed emails.so im not a beginner to this awesome UDF. just wondering what route you might think to be best to take. Link to comment Share on other sites More sharing options...
water Posted February 10, 2012 Author Share Posted February 10, 2012 Use function _OL_Open and specifiy the profile to be used and a password if necessary. The profile should be configured for the other user. 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 Link to comment Share on other sites More sharing options...
viraco Posted February 10, 2012 Share Posted February 10, 2012 Use function _OL_Open and specifiy the profile to be used and a password if necessary.The profile should be configured for the other user.TY Sir.I had forgotten that a mail profile had to be setup, not just supplying the username and password.This gets me where i need to be. Link to comment Share on other sites More sharing options...
water Posted February 10, 2012 Author Share Posted February 10, 2012 Glad to be of service 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 Link to comment Share on other sites More sharing options...
Sundance Posted February 29, 2012 Share Posted February 29, 2012 Hi water, we are migrating to Win7 and moving the PST files of the user to another destination. When the user first does a logon under Win7 the PSTs will be added to his Outlook. I wrote a littel script which does : - _OL_Open() - _OL_PSTAccess($oOutlook, $PST_FileName) - _OL_Close($oOutlook) The 'funny' thing: The PST is on a network share. When i do the PSTAccess there will be a newly created PST file within my Outlook program folder with the name of the opened file but with no content and this file is shown in my Outlook. Under WinXP there was no such problem. Do you have a suggestion? thx in advance Sundance Link to comment Share on other sites More sharing options...
water Posted February 29, 2012 Author Share Posted February 29, 2012 (edited) I created and accessed a PST on a network share. The share was specified using the drive letter e.g. K:Data. When the PST is empty only the filename is displayed. When you write some content to the PST, close the file and again use _OL_PSTAccess the correct name (parameter 3) will be displayed. You didn't use the 3rd parameter with _OL_PSTAccess so Outlook selects the name. There might be a change between the XP and the W7 version of Outlook. Edited February 29, 2012 by water 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 Link to comment Share on other sites More sharing options...
Sundance Posted February 29, 2012 Share Posted February 29, 2012 Okay. I will check this. Thanks for the fast answer. And again: TOP work!!!! Link to comment Share on other sites More sharing options...
Sundance Posted February 29, 2012 Share Posted February 29, 2012 Hi water, just wan't to report back. It now functions. My problem was that my script and the PST file was in the same folder. I did a _FileListToArray and from this list i added every found PST file with _OL_PSTAccess. So i gave it only the filename without the path. That was the problem! thx Sundance Link to comment Share on other sites More sharing options...
water Posted February 29, 2012 Author Share Posted February 29, 2012 Thanks for the feedback! 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 Link to comment Share on other sites More sharing options...
LOULOU Posted February 29, 2012 Share Posted February 29, 2012 For allowing Outlook to send file atachnments store on network instead of If StringMid($aOL_Temp[1], 2, 1) = ":" Ligne 2166 OutlookEx.udf type If StringMid($aOL_Temp[1], 2, 1) = ":" or StringMid($aOL_Temp[1], 1, 2) = "" Then ; Attachment specified as file Link to comment Share on other sites More sharing options...
water Posted February 29, 2012 Author Share Posted February 29, 2012 Thanks for this hint! Will be part of 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 Link to comment Share on other sites More sharing options...
LOULOU Posted February 29, 2012 Share Posted February 29, 2012 Hi, Shall it be possible to have more property for task item , or an example of script which allows declaring more properties. Thanks in advance Link to comment Share on other sites More sharing options...
water Posted February 29, 2012 Author Share Posted February 29, 2012 If you want to retrieve the properties of a task item please have a look at function _OL_ItemGet. You can specify the properties to return in a comma separated list. Or do you want to have user defined properties for a task 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 Link to comment Share on other sites More sharing options...
xian7479 Posted March 8, 2012 Share Posted March 8, 2012 Thanks forr making this UDF available.I'm trying to use this UDF to access IMAP folders set up in Outlook 2010 but couldn't make it work; not sure if this has been discussed before but I couldn't find any answer in the forum. When I use _OL_FolderAccess($oOutlook, "\\abc@mail.com", $olFolderInbox), abc@mail.com being the IMAP account display name, I don't get any error but get empty returned value. Also when I tried to use the _OL_StoreGet() function it shows the pst. or ost. property of the IMAP account is false but the IMAP account does have a local pst file which can be verified in Outlook.Any help would be appreciated.ThanksDanny Link to comment Share on other sites More sharing options...
water Posted March 8, 2012 Author Share Posted March 8, 2012 (edited) _OL_FolderAccess($oOutlook, "abc@mail.com", $olFolderInbox) doesn't return an error because there was a bug in the function (already fixed). IMAP hasn't been discussed yet and I have never used it myself. The IMAP folder is mapped to a PST file in Outlook by a definition in the Outlook profile. To access such an IMAP folder I think you need to access the PST file using _OL_PSTAccess. Could you please try toy access the PST file? Edited March 8, 2012 by water 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 Link to comment Share on other sites More sharing options...
xian7479 Posted March 9, 2012 Share Posted March 9, 2012 (edited) Hi Water Thank you very much for the quick reply! I thought about the _OL_PSTAccess before but was having two concerns. First, the pst file is already opened in Outlook so will it cause the pst file been loaded twice in Outlook; second, I would like to use a script to file emails based on subject line when they arrive and is the pst file updated in real-time. Anyway, I’ll set up an test environment and give it a go and report back. Thanks again. Danny Edited March 9, 2012 by xian7479 Link to comment Share on other sites More sharing options...
water Posted March 9, 2012 Author Share Posted March 9, 2012 Please have a look at the There is one script that handles Outlook events.If you run at least Outlook 2007 you can write a script that gets triggered (in fact a function in this script) every time a new mail arrives. 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 Link to comment Share on other sites More sharing options...
xian7479 Posted March 12, 2012 Share Posted March 12, 2012 Thanks for the suggestion. I got it work by using _OL_PSTAccess and the example script you mentioned works really well too. The handle returned by _OL_PSTAccess is attached to the the pst. file already opened in Outlook so it's fairly easy to work on the IMAP folder. However, the FolderPath property of the _OL_PSTAccess returned object can't be used as folder path so all references to folder have to be objects. Also I'm wondering if the results I got with _OL_ItemMove and _OL_FolderMove are strange; instead of moving items they create new items in target folders and delete the original items to "Deleted Items" folder in Outlook thus result in duplacate copies of the same items on the IMAP server (since the "Deleted Items" is considered a customer folder on the IMAP server while deleted items on the IMAP server are under a system folder called "Trash"). I don't have access to an Exchange server to test but would like to know if they work the same way with normal Outlook items. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts