472,951 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,951 software developers and data experts.

Cancelling Outlook meeting requests

I have a database that is used to book venues and assign people to those venues. The person doing the booking can send an appointment request from Access to an individuals Outlook calendar. This part of the system works fine.

I can also send a cancelled appointment request from Access to the same individual for the same appointment but for some reason Outlook is not recognising the cancel request as being for the original appointment so when the user (in Outlook) clicks 'remove from calendar' the original appointment is not removed.

Is there something else I need to be sending with the original and cancelled meeting requests?

The code for sending the meeting request is:

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdAddAppt_Click()
  2.     On Error GoTo Add_Err
  3.  
  4.     If Me!TutorID = 3 Then
  5.         MsgBox ("There is no tutor selected to send" & Chr(10) _
  6.             & "a meeting meeting request")
  7.         Exit Sub
  8.     End If
  9.  
  10.     'Exit the procedure if appointment has been added to Outlook.
  11.     If Me!ApptmentAdded = True Then
  12.         MsgBox "This appointment is already added to Microsoft Outlook"
  13.         Exit Sub
  14.     'Add a new appointment.
  15.     Else
  16.         Dim objOutlook As Outlook.Application
  17.         Dim objAppt As Outlook.AppointmentItem
  18.         Dim objDuration As Integer
  19.         Dim objOutlookRecip As Outlook.Recipient
  20.         Set objOutlook = CreateObject("Outlook.Application")
  21.         Set objAppt = objOutlook.CreateItem(olAppointmentItem)
  22.         objAppt.MeetingStatus = Outlook.OlMeetingStatus.olMeeting
  23.  
  24.         Dim aTemp As Long
  25.         Dim bTemp As Long
  26.         Dim cTemp As Integer
  27.         aTemp = Round((Int(CSng(Me!TimeTo) * 1440)) / 5, 0) * 5
  28.         bTemp = Round((Int(CSng(Me!TimeFrom) * 1440)) / 5, 0) * 5
  29.         cTemp = aTemp - bTemp
  30.  
  31.         Dim objMessage As String
  32.         Dim strRecip As String
  33.         Dim strSelfLead As String
  34.  
  35.         strRecip = Me![Tutor Email Address]
  36.         objMessage = "Teaching booking - " & Me![Programme Name] & ", " & Me![Name of Hirer]
  37.         If Me![Self Lead] = -1 Then
  38.             strSelfLead = "Yes"
  39.         Else
  40.             strSelfLead = "No"
  41.         End If
  42.  
  43.         With objAppt
  44.             Set objOutlookRecip = .Recipients.Add(strRecip)
  45.                 objOutlookRecip.Type = olTo
  46.             .Start = Me![Visit Date] & " " & Me!TimeFrom
  47.             .Duration = cTemp
  48.             .Subject = objMessage
  49.             .ReminderMinutesBeforeStart = 15
  50.             .ReminderSet = True
  51.             .Body = "Number of Students: " & Me![Student Total] & vbCrLf _
  52.                 & "Number of Adults: " & Me![Adult Total] & vbCrLf _
  53.                 & "Self Lead?: " & strSelfLead & vbCrLf _
  54.                 & "Level: " & Me!Level
  55.             .Location = Me!Venue
  56.             .Send
  57.         End With
  58.         'Release the AppointmentItem object variable.
  59.     End If
  60.  
  61.     'Release the Outlook object variable.
  62.     Set objAppt = Nothing
  63.     Set objOutlook = Nothing
  64.     Set objOutlookRecip = Nothing
  65.  
  66.     'Set the AddedToOutlook flag, save the record, display a message.
  67.     Me!ApptmentAdded = True
  68.     DoCmd.RunCommand acCmdSaveRecord
  69.     MsgBox "Appointment Added!"
  70.     Exit Sub
  71.  
  72. Add_Err:
  73.     MsgBox "Error " & Err.Number & vbCrLf & Err.Description
  74.     Exit Sub
  75.  
  76. End Sub
Oct 11 '07 #1
1 6048
nico5038
3,080 Expert 2GB
I guess you need to try to Find the appointment based on your data and then issue the delete.
This link might hold additional information:
http://www.mombu.com/microsoft/outlo...ry-937160.html

Nic;o)
Oct 11 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: James | last post by:
Is it possible for me to generate Outlook objects in an ASP.NET application on a web server (like a calander event for example) and then attach that object to an email so that the recipient can...
3
by: Bigfoot | last post by:
Hello, I would like to send e-mail and meetingrequests from an asp.NET webform, is this possible? In other words: can I use the Outlook objectmodel in asp.NET? Stefan
0
by: William | last post by:
Hi there, Is there anybody here who ever create outlook task item from asp .net script successfully ? Actually I've created the script for creating the task, and it run successfully from the...
0
by: DORIS | last post by:
How do you send meeting requests through Outlook using .Net Framework 2.0?
2
by: keri | last post by:
Hi, I am going to post this in an outlook group as well - however somebody here probably has a better answer for me. I have a table where the user assigns a activity to a date (eg meeting or...
0
by: kalichakradhar | last post by:
hi all, hi, I am developing a application which would open the shared calender of outlook and read the meeting notices and also modifies the meeting notice from Vb.I am successful in opening the...
2
by: daruse712 | last post by:
Hi there, I'm writing a function to search through a calendar to find any conflicting meeting times for the appointment recently recieved. Heres the code: Private Function isConflict(appt As...
0
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, I'm trying to build a Calendar (outlook style) with C#. When I just thought i almost finished, i found out that I've few problems. I want my calndar will have the ability to show few...
10
by: mofmans2ndcoming | last post by:
I have a script for my companies internal network that I am developing to ease the transition away from out old conference room scheduling system to outlook. (this is a stop gap until we can get...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.