Consulting

Results 1 to 4 of 4

Thread: Setting .BusyStatus = olFree not working?

  1. #1

    Setting .BusyStatus = olFree not working?

    I'm trying to use this macro in my inbox for incomming outlook calendar invites that will accept an appointment, set reminder to none, and busy status to free. Everything is working except the busy status is not changing to free (as if it's not reading this line of code, I've tried 0 instead of olFree also but no luck). Can you tell me what I'm doing wrong? Here is my code and I'm using Office 2010...

    Sub Accept_No_Reminder_Free_Status()

    Dim oRequest As MeetingItem
    Dim oAppt As Outlook.AppointmentItem

    Set oRequest = Application.ActiveExplorer.Selection.Item(1)
    If oRequest.MessageClass = "IPM.Schedule.Meeting.Request" Then
    Set oAppt = oRequest.GetAssociatedAppointment(True)

    'set fields on the appt.
    With oAppt
    .Categories = None
    .ReminderSet = False
    .BusyStatus = olFree
    .Save
    End With
    End If
    'autoaccept and send response
    Dim oResponse
    Set oResponse = oAppt.Respond(olMeetingAccepted, True)
    oResponse.Send
    'delete the request from the inbox
    oRequest.Delete
    End Sub

  2. #2
    I suspect it is the categories value which should be

    .Categories = ""
    With oAppt
           .BusyStatus = olFree
           .Categories = ""
           .ReminderSet = False
           .Save
     End With
    appears to work here.
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

  3. #3
    Thanks for the quick response, I tried that and it’s still not working. I even tried changing the reminder status to test oAppt, and that one changed, but the busy status keeps going to the default of Busy (even if I change it to olOutOfOffice, or olTentative it stays with busy). Any other ideas?

  4. #4
    It makes the change here, with those code modifications, so I regret I have no other suggestions as to why it doesn't work for you.
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •