Appointment-Cannot set Categories because ConversationID is not set

Status
Not open for further replies.

Steve Anthony

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I have had some simple code to set a category in an appointment.
This has been working until recently.

After much debugging, I've identified the root cause - appointments/meetings that come from other people.

The code still works for appointments that I create, but fails for others.
I was recently migrated from a local Exchange (2007?) to Exchange Online - unsure if this is related or not.

Simple example of the code (which will remove a category if it exists, add it if it does not):
Code:
Sub SetCategory(inCat As String)
  Dim objAppt As Object
          
  Dim i As Integer
  Dim strCats As String
  Dim bCatFound As Boolean
   
  Set objAppt = Application.ActiveExplorer.Selection.Item(1)

  strCats = objAppt.Categories
 
  If Len(strCats) = 0 Then
    objAppt.Categories = inCat
  Else
    'Check if category is already there - if so that means we need to delete
    If InStr(1, strCats, inCat) > 0 Then
      ' may not need to handle extra commas; if so, build a function
      objAppt.Categories = Replace(strCats, inCat, "")
    Else
        objAppt.Categories = inCat & "," & strCats
    End If
   
  End If
 
  Set objAppt = Nothing

End Sub

On any assignment of "objAppt.Categories", i receive the following error for appointments that I don't create:
Run-time error '440' : Object doesn't support this property or method

If I examine objAppt as a watch variable, I see :
: ConversationID : <Object doesn't support this property or method>

Since this is a read-only field, I'm befuddled at how to work around this.

Greatly appreciate any help!

Steve
 
One update/correction:
The code *is* working on new appointments. But appointments/meetings created before the migration seem to be those that fail.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
Y Q's on Appointment Reminders Using Outlook 2
V VBA Categories unrelated to visible calendar and Visual appointment Categories Outlook VBA and Custom Forms 2
M using excel to sort outlook appointment items Outlook VBA and Custom Forms 4
F Add a category before "Send an Email When You Add an Appointment to Your Calendar" Outlook VBA and Custom Forms 0
B Linking contact to an Appointment Using Outlook 1
S Appointment font size when printing only changes Tasks' font Using Outlook 0
D Copy Appointment Body to Task Body Outlook VBA and Custom Forms 0
S New Outlook Appointment - Select All Body Text and Change Font and Size Outlook VBA and Custom Forms 1
e_a_g_l_e_p_i Outlook 2010 How can I change the font size on right side appointment pane Using Outlook 12
Chiba Create an appointment for all the members Outlook VBA and Custom Forms 1
D Prevent popup of "Do you want to save changes?" when closing after opening an appointment to view Outlook VBA and Custom Forms 2
O Calendar - appointment templates and categories Using Outlook 1
W Appointment userproperties disappear Outlook VBA and Custom Forms 4
Nessa Can't create new appointment Using Outlook 1
F Appointment Show All Fields Using Outlook 1
C Trying to populate an appointment ComboBox from Excel Outlook VBA and Custom Forms 2
A Possible to hide ribbon with custom appointment form? Outlook VBA and Custom Forms 3
W Appointment occurrences change the location property Using Outlook 0
W Space in an Outlook appointment body Using Outlook 0
Dave A Run macro on existing appointment when it changes Outlook VBA and Custom Forms 1
JoeG Appointment Delete/Change Recurrence Outlook VBA and Custom Forms 0
S Display PF contact folder items to select contact to link to appointment Outlook VBA and Custom Forms 1
M Forward Appointment as BCC with VBScript Outlook VBA and Custom Forms 7
K Update Appointment category when changed in Excel Using Outlook 3
S View Appointment in Text Wrap in Outlook 2007 Month Calendar View Using Outlook 0
A Day view - print appointment details Using Outlook 1
R Recover Deleted Appointment in Calendar Using Outlook 0
N Select Appointment subject line from combobox or list Outlook VBA and Custom Forms 1
D Record Appointment to Calendar on "Public Folder" Outlook VBA and Custom Forms 13
G Copy Contact field to Appointment Custom Form Field Outlook VBA and Custom Forms 2
G How to Copy Multi Select Listbox Data to Appointment Outlook VBA and Custom Forms 3
S Appointment colour categories disappear Using Outlook 4
G Using Data From Combo Box in Appointment Body Outlook VBA and Custom Forms 6
C Set reminder / appointment by right clicking email Using Outlook 1
A Add attachments to appointment based on field values Outlook VBA and Custom Forms 0
S how to set user properties to a newly created appointment Outlook VBA and Custom Forms 12
Y Creating custom appointment request form with multiple mail recipients Outlook VBA and Custom Forms 5
S my vbscript button1_click code works on appointment created but not on opening an existing apntmn Outlook VBA and Custom Forms 16
G Create an Appointment at the Contact's Address From Email Outlook VBA and Custom Forms 0
Diane Poremsky Create Task or Appointment and Insert Selected Text Using Outlook 0
Pierce007 Maps/location in making an appointment Using Outlook 2
A Get shared calendar name or id in custom appointment form Using Outlook 0
Diane Poremsky Create Appointment From Email Automatically Using Outlook 0
C Reminder for single-click appointment Using Outlook 2
P Appointment times are off by one minute Using Outlook 1
M receive mail when appointment category changes and create task from appointment Outlook VBA and Custom Forms 0
B VBA Code to create appointment from email Outlook VBA and Custom Forms 1
Diane Poremsky Create an Outlook appointment from an email message Using Outlook 4
Diane Poremsky Create an Appointment Diary Using Outlook 0
N Adding Appointment Item in Outlook to Shared Calendar Folder Outlook VBA and Custom Forms 7

Similar threads

Back
Top