Jump to content

Outlook 2003 create appointment


Recommended Posts

Seems to be default Outlook behavior :huh:

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

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

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

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

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

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

_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

 

_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

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...