cookiemonster Posted May 31, 2013 Author Share Posted May 31, 2013 Unfortunately you can't do this with _OL_Wrapper_CreateAppointment. But it isn't too complex either. _OL_Wrapper_CreateAppointment just calls a few other functions of the UDF. You need _OL_FolderAccess to access "Cal B" and _OL_RecipientAdd to invite "Cal C". Call me stupid but I can find _OL_RecipientAdd? Link to comment Share on other sites More sharing options...
cookiemonster Posted May 31, 2013 Author Share Posted May 31, 2013 Call me stupid but I can find _OL_RecipientAdd? is it _OL_ItemRecipientAdd that I want? Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 (edited) Sorry my bad. Should be _OL_ItemRecipientAdd. _OL_ItemRecipientAdd is a function of the OutlookEX UDF. Edited May 31, 2013 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...
cookiemonster Posted May 31, 2013 Author Share Posted May 31, 2013 ok cheers, bit lost already, so the location of the calendar is 'Mailbox - calb' when I right click and select properties on the calendar in outlook, so my code is Global $oOutlook = _OL_Open() Global $aFolder = _OL_FolderAccess($oOutlook, "*\\Mailbox - IPhone") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_FolderAccess Example Script", "Error accessing folder '\\Mailbox - IPhone'. @error = " & @error) Global $aFolderDisplay[6][2] = [[$aFolder[0]],["","Folder object"],["","Default item type for the folder"],["", "StoreID where the folder resides"],["", "EntryID of the folder"],["", "Folder path"]] $aFolderDisplay[1][0] = $aFolder[1] $aFolderDisplay[2][0] = $aFolder[2] $aFolderDisplay[3][0] = $aFolder[3] $aFolderDisplay[4][0] = $aFolder[4] $aFolderDisplay[5][0] = $aFolder[5] _ArrayDisplay($aFolderDisplay, "Folder 'Outlook-UDF-Test\TargetFolder\Contacts' successfully accessed.") But its coming up with error 4 - 4 - Specified folder could not be found. @extended is set to the index of the subfolder in error (1 = root folder) I take it im looking in the wrong location for this calendar? Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 Try: Global $aFolder = _OL_FolderAccess($oOutlook, "*\Mailbox - IPhone") 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...
cookiemonster Posted May 31, 2013 Author Share Posted May 31, 2013 (edited) Try: Global $aFolder = _OL_FolderAccess($oOutlook, "*\Mailbox - IPhone") Nope same issue; error 4 This calendar were trying to gain access to is under my calendars, but the other recipient that I want to add is a shared calendar, when I right click and select property's this other one doesn't have a location, that field in outlook is empty, so am I just looking at the wrong thing for the location I need? Edited May 31, 2013 by quinnj09 Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 To access a shared calendar you need to pass the name of the "user". Outlook then needs to resolve this name to access the shard calendar. Global $aFolder = _OL_FolderAccess($oOL, "\\Cal B", $olFolderCalendar) 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...
cookiemonster Posted May 31, 2013 Author Share Posted May 31, 2013 To access a shared calendar you need to pass the name of the "user". Outlook then needs to resolve this name to access the shard calendar. Global $aFolder = _OL_FolderAccess($oOL, "\\Cal B", $olFolderCalendar) But Im lost on where to find the location of the calendar as when I right click and select propertys the location field is empty? Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 The location property doesn't help here. Provide the "username" as I posted above and post the resulting @error and @extended if it doesn't work. 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...
cookiemonster Posted May 31, 2013 Author Share Posted May 31, 2013 Global $oOutlook = _OL_Open() Global $aFolder = _OL_FolderAccess($oOutlook, "\\On-Call", $olFolderCalendar) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_FolderAccess Example Script", "Error accessing folder '\\On-Call'. @error = " & @error) Global $aFolderDisplay[6][2] = [[$aFolder[0]],["","Folder object"],["","Default item type for the folder"],["", "StoreID where the folder resides"],["", "EntryID of the folder"],["", "Folder path"]] $aFolderDisplay[1][0] = $aFolder[1] $aFolderDisplay[2][0] = $aFolder[2] $aFolderDisplay[3][0] = $aFolder[3] $aFolderDisplay[4][0] = $aFolder[4] $aFolderDisplay[5][0] = $aFolder[5] _ArrayDisplay($aFolderDisplay, "Folder 'Outlook-UDF-Test\TargetFolder\Contacts' successfully accessed.") Im now getting @error = 3 3 - Error accessing specified folder and its created a new calendar under shared calendars called 'Calendar - On-Call' the one im trying to access is just 'On-Call' Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 Can you please post or PM me a screenshot of your folder tree with the foler selected you want to access? Make sensitive data unreadable if needed. 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...
cookiemonster Posted May 31, 2013 Author Share Posted May 31, 2013 PM'ed you the screenshot cheers Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 Thanks - will have a look. 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...
water Posted May 31, 2013 Share Posted May 31, 2013 How about this? Global $aFolder = _OL_FolderAccess($oOL, "\\On-Call\", $olFolderCalendar) 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...
cookiemonster Posted May 31, 2013 Author Share Posted May 31, 2013 Do I not need $oOutlook rather than $oOL $oOL brings up function not found error but $oOutlook works as expected. Sent you another pm screenshot, its created an additional calendar again Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 Correct, you need the object for the Outlook application. In your case: $oOutlook. 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...
cookiemonster Posted May 31, 2013 Author Share Posted May 31, 2013 Thought so, you should have that other screenshot now, got stuck on the phone Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 So Global $aFolder = _OL_FolderAccess($oOutlook, "\\On-Call\", $olFolderCalendar) works and doesn't return an error? 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...
cookiemonster Posted May 31, 2013 Author Share Posted May 31, 2013 Yeh it works but its creating a new calendar under shared calendars called 'Calendar - On-Call' rather than using the 'On-Call' calendar thats already there Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 But both "On-Call" entries access the same calendar (show the same content)? 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...
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