Using classic Outlook for Windows in business environments
To change the start and end times of an appointment in Outlook, you can use the setAsync method provided by the Office JavaScript API if you are working with an Outlook add-in. Here’s how it works:
- Setting Start Time: You can set the start time of an appointment using
item.start.setAsync(dateTime, options, callback), wheredateTimeis a UTC-formattedDateobject. If the appointment already has a start time, changing it will automatically adjust the end time to maintain the same duration. - Setting End Time: Similarly, you can set the end time using
item.end.setAsync(dateTime, options, callback). If the appointment has an existing end time, changing it will adjust the duration accordingly.
However, if you are using the classic Outlook on Windows, note that the setAsync method cannot be used to change the start or end time of a recurring appointment. If your appointment is recurring, you will need to modify the series or individual occurrences through the appropriate methods.
Make sure you are using the correct permissions and that your add-in is set up properly to access these methods.