cookiemonster Posted May 31, 2013 Author Share Posted May 31, 2013 Yeh it appears in both calendars, any idea why its creating it as a second calendar? is there any way to stop this from happening? Link to comment Share on other sites More sharing options...
cookiemonster Posted May 31, 2013 Author Share Posted May 31, 2013 Ah ok I can remove the 'On-Call' calendar as its just duplicated it but putting 'Calendar - ' at the start. Now I get it i think, do you know why its put 'Calendar - ' at the start of the name though? Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 Seems to be default Outlook behavior 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 very odd, but oh well doesnt matter too much, cheers for sussing that out! I think il be shouting for help soon enough again, so i want to do _OL_FolderAccess.au3 _OL_ItemCreate.au3 _OL_ItemRecipientAdd.au3 Is that right? Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 Looks good. You will find some information about how to create an appointment in the wiki. 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 ive got a autoit script already that uses _OL_Wrapper_CreateAppointment but to do this new tool I need to use _OL_FolderAccess.au3 _OL_ItemCreate.au3 _OL_ItemRecipientAdd.au3 or could I use _OL_FolderAccess.au3 _OL_Wrapper_CreateAppointment _OL_ItemRecipientAdd.au3 Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 Approach number 1 is needed. _OL_Wrapper_CreateAppointment doesn't accept the folder parameter. 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 ah ok cheers Link to comment Share on other sites More sharing options...
cookiemonster Posted May 31, 2013 Author Share Posted May 31, 2013 ok got stuck at this point now... Getting @extended = 1; |1 - $iFolderType is missing or not a number Where would I set this? and where do I find what I need to set it to? Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 Looks like you miss $olFolderCalendar as in the example of post #58. 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 Nope thats there #AutoIt3Wrapper_AU3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=Y #include <OutlookEX.au3> 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 '\\On-Call\' successfully accessed.") $oItem = _OL_ItemCreate($oOutlook, $olAppointmentItem, "\\On-Call\", "", "Subject=TestSubject", "Start=" & _NowCalc(), "End=" & _DateAdd("h", 3, _NowCalc()), _ "Location=Building A, Room 10", "RequiredAttendees=" & $oOutlook.GetNameSpace("MAPI" ).CurrentUser.Name) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemCreate Example Script", "Error creating an appointment in folder '\\On-Call\'. @error = " & @error & ", @extended = " & @extended) _OL_Close($oOutlook) So I get the last error box "Error creating an appointment in folder 'On-Call'. @error = 1, @extended = 1" Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 _OL_FolderAccess returns an array. Element 1 contains the folder object. Pass this object to _OL_ItemCreate. $oItem = _OL_ItemCreate($oOutlook, $olAppointmentItem, $aFolder[1], "", "Subject=TestSubject", "Start=" & _NowCalc(), "End=" & _DateAdd("h", 3, _NowCalc()), _ "Location=Building A, Room 10", "RequiredAttendees=" & $oOutlook.GetNameSpace("MAPI" ).CurrentUser.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...
cookiemonster Posted May 31, 2013 Author Share Posted May 31, 2013 _OL_FolderAccess returns an array. Element 1 contains the folder object. Pass this object to _OL_ItemCreate. $oItem = _OL_ItemCreate($oOutlook, $olAppointmentItem, $aFolder[1], "", "Subject=TestSubject", "Start=" & _NowCalc(), "End=" & _DateAdd("h", 3, _NowCalc()), _ "Location=Building A, Room 10", "RequiredAttendees=" & $oOutlook.GetNameSpace("MAPI" ).CurrentUser.Name) Ah that I now understand, I did think surly it needs to be passed into it but for some silly reason didnt think of putting it it there like that. thats now working so going to look at putting in the required attendees now Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 Do you just want to create an appointment with some attendees or do you want to send a meeting request to the attendees? 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 An appointment with attendees so it also goes into their calendar too Link to comment Share on other sites More sharing options...
cookiemonster Posted May 31, 2013 Author Share Posted May 31, 2013 think im heading in the right direction with this: Global $oOutlook = _OL_Open() Global $aFolder = _OL_FolderAccess($oOutlook, "\\On-Call\", $olFolderCalendar) Global $oItem = _OL_ItemCreate($oOutlook, $olAppointmentItem, $aFolder[1], "", "Subject=TestSubject", "Start=" & _NowCalc(), "End=" & _DateAdd("h", 3, _NowCalc()), _ "Location=Building A, Room 10", "RequiredAttendees=" & $oOutlook.GetNameSpace("MAPI" ).CurrentUser.Name) _OL_ItemRecipientAdd($oOutlook, $oItem, Default, $olTo, "James Quinn") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemCreate Example Script", "Error creating an appointment in folder '\\On-Call\'. @error = " & @error & ", @extended = " & @extended) _OL_Close($oOutlook) Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 Add "MeetingStatus=1" to _OL_ItemCreate. This changes the appointment to a meeting request. When finished use _OL_ItemSend($oOutlook, $oItem) to send the meeting request.to the attendees. 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 Yep it all seems to work, is there a way to force the attendees as going rather than giving them the option to decline? Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 Not that I know of. I think that's what a meeting request is for. If the attendee has an important meeting with the boss, is sick or on vacation he has to be able to decline. 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 guess that makes sense. 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