473,378 Members | 1,462 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,378 software developers and data experts.

How to reschule an outlook appointment with access vba?

Dear All,

I have a Call Logger database with a scheduler function.
I've managed to book the appointments and set reminders in Outlook 2007 via access vba, but I'ma bit stuck in calling the appointment information via using the subject and then amending the date and time.

I would really appreciate if you couldprovide some sample code of how this possibly could be achieved. Please help.

Many thanks,

Vic
Feb 4 '11 #1
2 4498
beacon
579 512MB
This isn't perfect code, but could you use something like:

Expand|Select|Wrap|Line Numbers
  1. For Each Appointment in objAppointments
  2.     If Appointment.Subject = "Your Subject" Then
  3.         Appointment.Start = #Your Start Date# & " " & #Your New Start Time#
  4.         Appointment.Duration = #The Length of Appointment#
  5.     Else
  6.         'Do Nothing
  7.     End If
  8. Next 
  9.  
Feb 4 '11 #2
Dear All,

I'm hoping someone can help me with this problem.
I've managed to create and reschedule outlook appointments and set
reminders using Access 2007.
The problem I have is that the Reminder Pop-up window does not reflect
the new information, for example:
1.) If the reminder IsVisible in the pop-up window and the appointment
is rescheduled to a future date it remains visible and does not
reflect new appointment date.
2.) If the reminder is not Visisble in the pop-up window and I
reschedule the appointment back to past date it does not pop-up in
reminder window to alert as to still being outstanding.

Could you please advise how to synchronize these?

Many thanks,

Fincc

Here is the code I use for the "Callback or Re-schedule Callback":

------------------------------------------------------------------------------------------
'--------------------------------------
' Schedule OR Re-schedule a Callback
'--------------------------------------
Private Sub ReOrScheduleCallback()

'On Error GoTo ReOrScheduleCallback_Err

Dim OutLookReminder As Outlook.AppointmentItem
Dim objApp As Outlook.Application
Dim ObjNS As Outlook.NameSpace
Dim ObjFolder As Outlook.Folder
Dim srFilter

Set objApp = CreateObject("Outlook.Application")
Set ObjNS = objApp.GetNamespace("MAPI")
Set ObjFolder = ObjNS.GetDefaultFolder(olFolderCalendar)


srFilter = "[Mileage] = " & recordID & ""

If Not ObjFolder Is Nothing Then
Set OutLookReminder = ObjFolder.Items.Find(srFilter)

If OutLookReminder Is Nothing Then

Dim Reminder As Outlook.AppointmentItem
Set appOutLook = CreateObject("Outlook.Application")
Set Reminder = appOutLook.CreateItem(olAppointmentItem)

With Reminder
' Here create new item if not found
.Mileage = recordID
.Subject = "" & AccountField & ""
.Body = "" & Notes & ""
.ReminderSet = True
.ReminderOverrideDefault = True
.ReminderMinutesBeforeStart = 5
.Start = DateofTask & " " & AppTime
.ReminderPlaySound = True
'add the path to a .wav file on your computer.
.ReminderSoundFile = "G:\FINCC\Call Log\LogPics
\ding.wav"
.Save
End With
MsgBox "Reminder for " & AccountField & " scheduled for
" & DateofTask & " at " & AppTime & ""
Me.Account.SetFocus

Else

With OutLookReminder
' here you can get or change any of the properties of
the appointmentItem

.Mileage = recordID
.Subject = "" & AccountField & ""
.Body = "" & Notes & ""
.Start = DateofTask & " " & AppTime
.Save
.ReminderSet = True
.ReminderOverrideDefault = True
.ReminderMinutesBeforeStart = 5
.ReminderPlaySound = True
'add the path to a .wav file on your computer.
.ReminderSoundFile = "G:\FINCC\Call Log\LogPics
\ding.wav"
.Save
End With
MsgBox "Reminder Rescheduled for " & AccountField & "
scheduled for " & DateofTask & " at " & AppTime & ""
Me.Account.SetFocus
End If

Else
MsgBox "Problem Connecting with Outlook"
End If

ReOrScheduleCallback_Exit:
Exit Sub

ReOrScheduleCallback_Err:
MsgBox "Hello"
Resume ReOrScheduleCallback_Exit
End Sub
------------------------------------------------------------------------------------------





I've tried dismissing the reminder with this code below, but that
seems to delete the whole appointment (which in some instances is not
desired) :

Private Sub DismissReminder()

On Error GoTo DismissReminder_Err

'Dismisses related active reminders.

Dim olApp As Outlook.Application
Dim objRem As Reminder
Dim objRems As Reminders

Set olApp = Outlook.Application
Set objRems = olApp.Reminders


If olApp.Reminders.Count <> 0 Then
For Each objRem In objRems
If objRem.Caption = AccountField And objRem.IsVisible =
True Then

objRem.Dismiss


End If

Next

Else

' Do nothing

End If

DismissReminder_Exit:
Exit Sub

DismissReminder_Err:
MsgBox Error$
Resume DismissReminder_Exit

End Sub
-------------------------------------------------------------------------------------------------------------------------------
Feb 13 '11 #3

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

Similar topics

11
by: Google Mike | last post by:
I've got RH9 Linux with default PHP. Is there a way to send email on Linux to an Exchange Server from PHP and/or other tools when there is *NOT* SMTP access? Has anyone figured out a way to...
0
by: Akira | last post by:
Could someone tell me how to send outlook appointment email from asp page? I would like appointment email just like one outlook can send out. I tried to look for an answer for this, but it seems...
2
by: Kamyk | last post by:
Hello all! I have the following problem. I know how to create a mail in VB with a subject and people to send, but is it possible to create an Outlook appointment in VB, if it is possible, please...
0
by: Georges | last post by:
Hi, Can anyone help me with this. I would like to create outlook appointment from a web application. I tried to look at the CDO, WebDAV and MAPI documentations without success. what is the best...
6
by: chuckdfoster | last post by:
Is there a way to create an New Outlook Appointment from an ASP.NET application? I would also need to check if Outlook is running first. Any suggestions, advice?
0
by: forbisthemighty | last post by:
A familiar behavior seen in Outlook Web Access is mini-browser windows that pop up telling the user a task is due for completion or an appointment is coming up. I'm looking for ideas on how this is...
1
by: Vince Varallo | last post by:
Hello everyone, Is there any way to create a single sign on solution that can authenticate a user and then store the credentials and pass them to outlook web accees? Essentially we want the...
0
by: keri | last post by:
Hi everyone, I have searched for info on this topic but have not found anything. Basically I have a db that posts appointments to outlook. I would like to be able to set all of the outlook...
1
by: =?Utf-8?B?VGVkZXNjbw==?= | last post by:
I am running Outlook Express 6 on my home computer. I am able to access my work email from home it is Outlook Web Access. I understand that the two are different. I can not insert pictures with...
4
by: macca | last post by:
hi, Does anybody know if it's possible to log into Outlook Web Access using PHP? I mean, if I have the username, password and email address I need to have a link that opens directly into...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.