OutlookEX UDF - Appointment Item: Difference between revisions

From AutoIt Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:UDF]]
[[Category:UDF]]
[[Category:Outlook]]
Here you find detailed information about how to work with Appointment items.  
Here you find detailed information about how to work with Appointment items.  


Line 24: Line 25:


=== _OL_AppointmentGet - Strange results ===
=== _OL_AppointmentGet - Strange results ===
_OL_AppointmntGet might return an array like this (notice the empty column0):
_OL_AppointmentGet might return an array like this (notice the empty Col 0 starting with Row 141):<br />
[[File:/home/thomas/Downloads/ OL AppointmentGet Bug.jpg|thumb|Missing EntryID and Object]]
[[File:OLAppointmentGetBug.jpg|300px|EntryID and object missing]]
 
_OL_ErrorNotify returns something like this:<br />
Description = The number of items that can be opened at one time has been limited by the server administrator. Close any open messages, or remove attachments and pictures of unsent messages you are about to author.
 
To solve this problem set parameter $bExclObject to True when calling _OL_AppointmentGet. Call _OL_ItemGet and pass the EntryID (Col 0 from the returned array) when you need the object of the appointment item in your script.

Latest revision as of 09:29, 27 July 2023

Here you find detailed information about how to work with Appointment items.

Wrapper function

The following function is a "wrapper" that combines multiple function calls to mimic functions available in the "original" Outlook UDF.
This should make your scripts a bit shorter and live a bit easier.

CreateAppointment

The wrapper function _OL_Wrapper_CreateAppointment allows to create an appointment, setting subject, body, start and end date, duration, location, reminder, recurrence information etc. in one go. This wrapper function mimics the function of _OutlookCreateAppointment of the original UDF.

Example:

#include <OutlookEx.au3>
$oOL = _OL_Open()
Global $sStart = StringLeft(_Nowcalc(),16)
Global $sEnd   = StringLeft(_DateAdd("h", 3, _NowCalc()), 16)
_OL_Wrapper_CreateAppointment($oOutlook, "Test Appointment", $sStart, $sEnd, "My office", False, "Testbody", _
    15, $olBusy, $olImportanceHigh, $olPrivate, $olRecursWeekly, $sStart, _DateAdd("w", 3, $sEnd), 1)
_OL_Close()

This creates an appointment and sets subject, start and end date/time of the first occurence, location, body, importance, sensitivity, recurrence type to weekly and end of recurrence to 3 weeks later.

_OL_AppointmentGet - Strange results

_OL_AppointmentGet might return an array like this (notice the empty Col 0 starting with Row 141):
EntryID and object missing

_OL_ErrorNotify returns something like this:
Description = The number of items that can be opened at one time has been limited by the server administrator. Close any open messages, or remove attachments and pictures of unsent messages you are about to author.

To solve this problem set parameter $bExclObject to True when calling _OL_AppointmentGet. Call _OL_ItemGet and pass the EntryID (Col 0 from the returned array) when you need the object of the appointment item in your script.