water Posted March 5, 2015 Author Share Posted March 5, 2015 I do not know how they create the Outlook profiles in my company (by a script or GPO) but I think you can manually create the profile file and then call Outlook once using a command line parameter to use the profile file. I think it could be "/importprf path:<filename.prf>" as described here. How to create a profile is described 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 Link to comment Share on other sites More sharing options...
crashnburn Posted April 14, 2015 Share Posted April 14, 2015 Is there a way to add a contact group? Id like to keep an up to date group list utilizing this and the AD function. Link to comment Share on other sites More sharing options...
water Posted April 15, 2015 Author Share Posted April 15, 2015 Can you please describe exactly what you want to do? Do you wanto to create/modify the address list using the OutlookEX UDF? 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...
crashnburn Posted April 15, 2015 Share Posted April 15, 2015 I have a script that gets a list of all users in a specific group and pulls their emails. I would like to create a contact group in outlook with this list of emails. I would also like it update the list as emails are added or removed. Link to comment Share on other sites More sharing options...
water Posted April 15, 2015 Author Share Posted April 15, 2015 The _OL_Distlist* functions should do what you need. 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...
crashnburn Posted April 15, 2015 Share Posted April 15, 2015 (edited) Thank you water. I am not fully understanding how to use the _OL_DistListMemberAdd function. I have a 2D array, $names, that hold the users full name and their email address. I am trying to loop through the array and add them to the list but im at a lose as to how to properly layout this function. Here is what I put together: _OL_DistListMemberAdd($outlook, $names[$a][0], Default, $names[$a][1]) $names[$a][0] = Users full name $names[$a][1] = Users email address UDPATE: I figured it out. I was not using _OL_ItemCreate to create the list first. Using that and replacing $names[$a][0] with the created item fixed it. Thank you very much for your help water. Edited April 15, 2015 by crashnburn Link to comment Share on other sites More sharing options...
water Posted April 15, 2015 Author Share Posted April 15, 2015 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...
crashnburn Posted April 15, 2015 Share Posted April 15, 2015 Hit another speed bump. I am trying to use the _OL_ItemFind to get a handle on the DistList so I can check it for existing users but I am not getting the syntax correct. Im getting an @error 3 and @extended 4. $search = _OL_ItemFind($outlook, "Contacts", $olDistributionListItem, "", "Sales Group") If @error = 0 Then _ArrayDisplay($search) Else MsgBox(48, "OutlookEX UDF: _OL_ItemFind Example Script", "Error finding the list. @error = " & @error & ", @extended: " & @extended) EndIf Link to comment Share on other sites More sharing options...
water Posted April 15, 2015 Author Share Posted April 15, 2015 Try: "*Contacts" for the folder name. 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...
crashnburn Posted April 15, 2015 Share Posted April 15, 2015 $search = _OL_ItemFind($outlook, "*\Contacts", $olDistributionListItem, "", "Sales Group") Still returned @error 3 and @extended 4 Link to comment Share on other sites More sharing options...
water Posted April 15, 2015 Author Share Posted April 15, 2015 Try this one: $aResult = _OL_ItemFind($oOutlook, "*\Contacts", $olDistributionList, "", "DLName", "Sales Group", "EntryID") 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...
crashnburn Posted April 15, 2015 Share Posted April 15, 2015 (edited) Try this one: $aResult = _OL_ItemFind($oOutlook, "*\Contacts", $olDistributionList, "", "DLName", "Sales Group", "EntryID") Still returns @error 3 and @extended 4. I tried eliminating the optional parameters too but still got the same errors $aResult = _OL_ItemFind($oOutlook, "*\Contacts") Edited April 15, 2015 by crashnburn Link to comment Share on other sites More sharing options...
water Posted April 15, 2015 Author Share Posted April 15, 2015 @error 3, @extended 4 means: Specified folder could not be found. Your contacts folder is named "Contacts"? 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...
crashnburn Posted April 15, 2015 Share Posted April 15, 2015 (edited) The default folder is named "Contacts (This computer only)". I had created another folder call "Contacts". I tried using "Contacts (This computer only)" and it no longer errors out, it just shows an empty array as there was nothing in there. I moved over the contact list and a few other contacts, now it brings up an array with all of the contacts, but not the list that I had created earlier. Also, I converted it to this: $aResult = _OL_ItemFind($oOutlook, "*\Contacts (This computer only)") To eliminate any possible error while testing. Edited April 15, 2015 by crashnburn Link to comment Share on other sites More sharing options...
water Posted April 15, 2015 Author Share Posted April 15, 2015 What does $aResult = _OL_ItemFind($oOutlook, "*\Contacts (This computer only)", $olDistributionList, "", "DLName", "Sales Group", "EntryID") return? 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...
crashnburn Posted April 15, 2015 Share Posted April 15, 2015 It returns a series of numbers and letters which im assuming is the handle for the list. I had entered the syntax incorrectly before I tried the condensed version. Thank you so much water for helping get through this, I really appreciate it! Link to comment Share on other sites More sharing options...
water Posted April 15, 2015 Author Share Posted April 15, 2015 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...
horphi Posted July 31, 2015 Share Posted July 31, 2015 (edited) Hello,when i´m using ItemSearch, the columns Status and Categories are empty though the array gives a fine result.In the other columns EntryId and Subjectare values existing.Somebody know why?Global $aItems =_OL_ItemSearch($oOutlook,$StrOutlook_Inbox,$strsql,"EntryId,Subject,Categories,Status")Brhorphi Edited July 31, 2015 by horphi Link to comment Share on other sites More sharing options...
water Posted August 1, 2015 Author Share Posted August 1, 2015 I assume you are searching for mails.Status is not a valid property for a mail item.Categories should return a string of assigned categories to the item.What is the value of @error after _OL_ItemSearch? 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...
horphi Posted August 1, 2015 Share Posted August 1, 2015 (edited) I assume you are searching for mails.Status is not a valid property for a mail item.Categories should return a string of assigned categories to the item.What is the value of @error after _OL_ItemSearch?Hello Water,yes i´m looking for mails. No error appears. It find the mails, but display only the subject and not the body....Global $oOutlook = _OL_Open() $isTerm = "ACS" ;~ $StrOutlook_Inbox ="\Posteingang" If $iInBx <> GUICtrlRead($InBx) Then $iInBx = GUICtrlRead($InBx) EndIf $StrOutlook_Inbox = $iInBx If $isTerm <> GUICtrlRead($sTerm) Then $isTerm = GUICtrlRead($sTerm) EndIf $strsql = '@SQL=urn:schemas:httpmail:subject ci_startswith ' & '''' & $isTerm & '''' Global $aItems =_OL_ItemSearch($oOutlook,$StrOutlook_Inbox,$strsql,"EntryId,Subject,body")BR Edited August 1, 2015 by horphi 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