473,395 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 6111
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.