Unable to change AppointmentItem.Start property

danno

Senior Member
Outlook version
Outlook 2016 64 bit
Email Account
IMAP
On some items of type AppointmentItem, I can set the Start property either as data type String or Date, other items of same type (I verified this by use TypeName (item)), I get either 'object does not support method' (if item declared as Object) or 'type mismatch (if item declared as AppointmentItem). The best clue I can think of is some appointments are created via VBA - those work properly to set Start property. Appointments created via Outlook UI get the error trying to set the Start property. Visually both appointments (created by VBA or via Outlook UI) look the same - baffled by the randomness of the error.

I tried the following without success:
1) Declared item as AppointmentItem - error changed from "object does not support..." to "type mismatch"
2) Declared and passed NewDate as String

Here's the code:

Sub ResetApptStartTime()
Dim CalFolder As Folder
Dim folders As folders
Dim FolderCount As Integer, ItemCount As Integer
Dim NewDate As Date

'Set CalFolder = Session.GetDefaultFolder(olFolderCalendar)
Set CalFolder = ActiveExplorer.CurrentFolder
NewDate = Format(Now, "mm/dd/yyyy")
If (WeekdayName(Weekday(NewDate)) = "Saturday") Then
NewDate = DateAdd("d", 2, NewDate)
Else
If (WeekdayName(Weekday(NewDate)) = "Sunday") Then NewDate = DateAdd("d", 1, NewDate)
End If
NewDate = NewDate & " " & #11:59:00 PM#
ProcessCalFolders CalFolder, NewDate, FolderCount, ItemCount
Debug.Print "Folders processed: ", FolderCount, "Items processed: ", ItemCount

End Sub

Sub ProcessCalFolders(CalFolder As Folder, ByVal NewDate As Date, FolderCount As Integer, ItemCount As Integer)
Dim SubFolder As Folder
Dim PartialSubject As String
Dim PrevDate As Date
Dim item As Object

On Error GoTo ErrHandler
FolderCount = FolderCount + 1

For Each item In CalFolder.Items
If item.Class <> olAppointment Then MsgBox "The folder you selected contains non-appointment items, aborting": Exit Sub
PartialSubject = Left(item.Subject, 50)
PartialSubject = Replace(PartialSubject, vbCrLf, "")
PartialSubject = Replace(PartialSubject, vbLf, "")
Debug.Print PartialSubject
PrevDate = item.Start
If Now > PrevDate Then
item.Start = NewDate & " " & #6:00:00 AM# 'THIS LINE GENERATES THE ERROR
item.End = NewDate & " " & #6:00:00 AM#

' item.Save
Debug.Print "Subject: ", PartialSubject, "changed from ", PrevDate, " to ", item.Start
ItemCount = ItemCount + 1
End If
Next
For Each SubFolder In CalFolder.folders
ProcessCalFolders SubFolder, NewDate, FolderCount, ItemCount
Next
Exit Sub

ErrHandler:
Debug.Print Err.Number, Err.Description
Resume Next

End Sub
 
Last edited:
It turns out that nearly all of the manually created AppointmentItems are recurring and I guess there's no option in VBA to modify the start date/time of a recurring appointment (is there?). Non-recurring appointments work ok.
 
Troubleshooting: Unable to Change AppointmentItem.Start Property

Introduction

When working with Outlook applications, it's not uncommon to encounter issues when attempting to modify the AppointmentItem.Start property. This can be a frustrating roadblock for many developers and users alike. In this article, we'll explore the common reasons behind this problem and provide step-by-step solutions to resolve it.

Step 1: Understanding the Issue

  1. What Causes the Issue? The inability to change the AppointmentItem.Start property often arises due to conflicting permissions or restrictions within the Outlook environment.
  2. Is this a Common Problem? Yes, this issue is encountered by a significant number of Outlook users, particularly those who interact with the Outlook API for scheduling and managing appointments.
  3. How Does it Impact Users? For developers and users, this issue can lead to difficulties in managing their schedules effectively. It can also hinder the automation of tasks related to appointments.
Step 2: Troubleshooting Solutions

  1. Check User Permissions Ensure that the user account you are using has the necessary permissions to modify calendar events. This can be done by verifying the account's settings in the Outlook application.
  2. Verify Object References Double-check that you are working with the correct AppointmentItem object. Incorrect references can lead to unexpected behavior.
  3. Review Synchronization Settings If you're working in a synchronized environment, ensure that there are no conflicts between the local and server copies of the calendar item.
  4. Handle Exceptions Implement appropriate exception handling in your code to gracefully manage any errors that may occur when attempting to modify the AppointmentItem.Start property.
  5. Debugging Tools Utilize debugging tools provided by your development environment to step through your code and identify any logical errors. Click
  6. Check for Add-ins or Extensions Sometimes, third-party add-ins or extensions can interfere with the normal behavior of Outlook. Temporarily disable any such add-ins to see if they are causing the issue.
Step 3: Helpful Resources

For more in-depth information on Outlook API and related troubleshooting, refer to the following articles:

  • Understanding Outlook API
  • Troubleshooting Outlook Integration
Conclusion

Resolving the issue of being unable to change the AppointmentItem.Start property is crucial for smooth scheduling and calendar management within the Outlook environment. By following the steps outlined in this article, you can overcome this obstacle and ensure that your application interacts seamlessly with the Outlook API. Remember to always check for updates or patches from Microsoft, as they may release fixes for known issues related to Outlook integration.
 
Found a way to modify the starting date of a recurring appointment. Here' how it's done:
1) Determine if the appointment item is recurring using the .IsRecurring property of the AppointmentItem object.
2) if IsRecurring is True, then use the .PatternStartDate property of the RecurrencePattern object to set the new start date for the recurring series and save the changed AppointmentItem.
3) To modify properties of the next or other occurrence, must create another instance of the AppointmentItem object and use GetOccurrence property (date) of RecurrencePattern object to access that item.

Must immediately set object instances to 'nothing' after done modifying the items. More info here: AppointmentItem.GetRecurrencePattern method (Outlook). Code example:

Dim olItem as AppointmentItem
Dim olRecurrencePattern As RecurrencePattern
'possible code here to figure out date offset or take input from user
'rdate is offset to existing start date of appointment or recurring series
If olItem.IsRecurring Then
Set olRecurrencePattern = olItem.GetRecurrencePattern
olRecurrencePattern.PatternStartDate = rdate1 'adding offset to prior start date doesn't affect start time
olItem.Save
Else
olItem.Start = rdate1
End If
Set olItem = Nothing
Set olRecurrencePattern = Nothing
 
I have been looking for a long time for a company that sells factory automation equipment. After all, I decided to get involved in this very process because I think it is very important. And I am glad that I found out about the company iqelectro which sells automation equipment from the best proven and reliable manufacturers. The company itself gives the client a 2-year warranty on the equipment, which is very pleasing. And also the equipment can be purchased in installments, which is also very convenien
 
Similar threads
Thread starter Title Forum Replies Date
S Unable to change Message Class Outlook VBA and Custom Forms 0
S Outlook 2010 unable to change default font Using Outlook 7
Tim King Outlook 365 unable to change accounts Using Outlook 0
Rupert Dragwater unable to change font sizes in some replies Using Outlook 3
D VBA - unable to set rule condition 'on this computer only' Outlook VBA and Custom Forms 5
L Unable to Use Alias as From Address Using Outlook 2
R unable to filter tasks when start date is on or before today Using Outlook 3
J Unable to delete folders in Outlook 2019 / Windows Using Outlook 0
D Unable to view older emails in desktop app Using Outlook 0
M Issues with templates - unable to find in old web app Using Outlook 3
Commodore Unable to move message Using Outlook 3
O Unable to make changes to an existing Calendar entry Using Outlook 11
C Outlook 2016 Unable to delete Gmail IMAP calendar Using Outlook 2
S Unable to extract text from an Outlook email message Using Outlook 2
B Outlook 2016 Unable to view images or logos on the outlook 2016 emails the same html code works well when i use outlook 2010 Using Outlook 0
M Unable to share 2019 calendar Using Outlook 0
D Outlook 2016 Unable to load Outlook data pst file Using Outlook 5
L Unable to Sync Web/Android MS To Do with Windows Outlook Tasks Using Outlook 3
A Unable to save recurring Meeting to Documents folder due to error Using Outlook 2
O Outlook 365 - suddenly unable to send using Gmail POP3 Using Outlook 10
Q Unable to Sync Quicken reminder with Outlook 2016 64Bit Using Outlook 1
S Unable to remove rule outlook 2010 Using Outlook 0
L Wierd Office 365 Contact unable to edit body of random contacts Using Outlook 5
X Unable to send an email from one account to another on same PC Using Outlook 2
Mark Foley Unable to subscribe to published calendar in Outlook 2010 Using Outlook 4
S Unable to Edit Contact Information in Certain Contact Folders Using Outlook 3
P Deleted Items - Unable to Iterate All of Items Outlook VBA and Custom Forms 1
G Unable to dismiss reminders from share point list calendar shared in Outlook Using Outlook 2
R Unable to install without email account Using Outlook 4
E Unable to open Outlook 2010 after adding new email account Using Outlook 4
A Outlook 2016- unable to have all subfolders expanded when opening outlook Using Outlook 11
avant-guvnor Unable to view certain emails in Outlook 2016 Using Outlook 16
M Unable to Configure Gmail Account in Outlook 2007 Using Outlook 1
D Unable to Send On Behalf of Another User Exchange Server Administration 0
J Unable to link email messages in BCM using a single microsoft office 365 account in outlook 2013 BCM (Business Contact Manager) 1
R Unable to send mail using Cox.net Using Outlook 1
T Unable to 'Upload a file' using popup 'Browse' button Using Outlook 0
D Unable to add email address to contact Using Outlook 3
G Outlook calendar entry corrupted. Constant pop up when you open outlook. Unable to delete or remove. Using Outlook 2
O OL2000: Unable to create IMAP account Using Outlook 2
wallisellener Unable to reply/post/create new thread using Chrome BCM (Business Contact Manager) 5
C Unable to see meeting attendees Outlook 2010 Using Outlook 5
M Unable to email from Word or Excel Using Outlook 11
O Unable to check name. Using Outlook 3
T Unable to create contacts subfolder in EAS profile Using Outlook.com accounts in Outlook 6
UncleBill Unable to delete items from gmail IMAP Trash using Outlook 2010 Outlook VBA and Custom Forms 5
B Unable to search delegated mailfile Using Outlook 3
K Unable to activate QueryBuilder in Outlook 2010 (32bit) with Windows 7 (64bit) Using Outlook 1
C Unable to forward email with URL Using Outlook 2
R New computer, OL2010 unable to display shared calendar appointments Exchange Server Administration 3

Similar threads

Back
Top