Sebastien1 Posted October 28, 2018 Posted October 28, 2018 Hello, I'm trying to add a public folder to the favorites subfolder on the top of the left pan in Outlook 2010. Please see screenshot showing what i'm trying to realise. The code I'm using (found in this forum, but dated to 2011) doesnt work. It does find the folder "Test1234" but doesnt add it to the favorites subfolder and then exit with no error. Could you point me in the right direction? Thank you in advance. PS : My outlook 2010 is in french. The code: #include <OutlookEX.au3> $oOL = _OL_Open() $aOL_Folder = _OL_FolderAccess($oOL, "fichiers serveur\Test1234", Default) If @error <> 0 Then Exit MsgBox(16,"Outlook Script", "Error accessing the public folder. Error: " & @error) $aOL_Folder[1].AddToPFFavorites If @error <> 0 Then Exit MsgBox(16,"Outlook Script", "Error adding folder to public folder favorites. Error: " & @error) _OL_Close($oOL) -Seb
water Posted October 28, 2018 Posted October 28, 2018 This 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
Sebastien1 Posted October 28, 2018 Author Posted October 28, 2018 Hello Water, Yes, it is exaclty the thread from which I took the script, but it is still not working while exiting with no error. Any suggestions as to why it is not adding the folder to the favorites? Regards!
water Posted October 28, 2018 Posted October 28, 2018 Ops, didn't notice that you already posted the solution Add "_OL_ErrorNotify(2)" after "_OL_Open" in your script so we get better error information. And add brackets to as follows: $aOL_Folder[1].AddToPFFavorites() 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
Sebastien1 Posted October 28, 2018 Author Posted October 28, 2018 thank you for your ongoing help. I added the brackets. Still not working. There is no error, so "_OLErrorNotify(2)" doesn't return anything. Please see screenshot
water Posted October 28, 2018 Posted October 28, 2018 MSDN is not 100% clear where the folder gets added to https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2010/ff869286(v%3doffice.14) They talk about "Adds a Microsoft Exchange public folder to the public folder's Favorites folder." and "adds the public folder GroupDiscussion to the user's Favorites folder" As we run Office 2016 I'm not sure which of the statements is true. 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 October 28, 2018 Posted October 28, 2018 Or maybe it is a problem with Outlook 2010 as described here:https://answers.microsoft.com/en-us/office/forum/office_2010-outlook/problem-with-outlook-favorites-list-not-showing/0ea2f68b-267d-4eea-a02c-c17fc9fdb17e Maybe one of the proposed solutions works for you? 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
Sebastien1 Posted October 28, 2018 Author Posted October 28, 2018 Thank you for your research on this topic, unfortunatly, it is still not working. Probably Outlook 2010 fault
water Posted October 29, 2018 Posted October 29, 2018 That’s what I fear too 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