Setting a reminder in Access onto a shared Outlook calendar

AlexD

Registered User.
Local time
Today, 02:49
Joined
Sep 20, 2002
Messages
35
Hi,

After much fiddling about I was able to adapt some Microsoft automation code that allowed me to add a calendar reminder in Outlook 2000 after clicking a button on a form in Access 2000.

At the moment this sets a reminder on my own PCs Outlook calendar. What I want to do is set up a reminder on a shared calendar for other colleagues, but am a bit stuck.

The shared calendar is called 'Marketing Reminders' and the code as it stands is below.

Any help is much appreciated, but I am a bit of a VB novice, so bear that in mind.

cheers,

Alex
:)


Private Sub addTask_Click()


On Error GoTo Add_Err

'Save record first to be sure required fields are filled.
DoCmd.RunCommand acCmdSaveRecord


Dim objOutlook As Outlook.Application
Dim objAppt As Outlook.AppointmentItem
Dim objRecurPattern As Outlook.RecurrencePattern

Set objOutlook = CreateObject("Outlook.Application")
Set objAppt = objOutlook.CreateItem(olAppointmentItem)

With objAppt
.Start = Me!FOLLOWUPCALLBACK & " " & Me!FOLLOWUPCALLBACK_TIME
.Subject = Me!Company & " - " & Me!NEXTACTION
.Duration = 0
.ReminderSet = True
.ReminderMinutesBeforeStart = 0
.Save
.Close (olSave)
End With
'Release the AppointmentItem object variable.
Set objAppt = Nothing


'Release the Outlook object variable.
Set objOutlook = Nothing

'Set the AddedToOutlook flag, save the record, display a message.
DoCmd.RunCommand acCmdSaveRecord
MsgBox "Appointment Added!"

Exit Sub

Add_Err:
MsgBox "Error " & Err.Number & vbCrLf & Err.Description
Exit Sub
End Sub
 
If so,

Set myFolder = NameSpace.GetDefaultFolder(olPublicFoldersAllPublicFolders)
Set myFolder = myFolder.Folders("Marketing Reminders")
Set objAppt = myFolder.Items.Add
 
Alex,
I'm trying to do what you've already accomplished. I want to take info from MS Access Form and basically place it on my MS Outlook Calendar.

Firstly, I have an ASP web form with a MYSQL backend that takes reservation request for the use of our facility.

I have my MS Access DB linked to the DB from the ASP web form.

I would like to place 'event date', 'starttime', 'endtime' and 'room' on my MS Outlook Calendar.

Can you help me with this. I'm good at figuring things out, I just need some generic code to accomplish this.

Thanks

Eforce :confused:
 
Appointments in Public Shared Calendar

I have used the above code and can also create appointments in the local calendar but I am having a problem in getting the data to the public Shared Calendar.
The code can't find the folder BrianCalPub but it appears as a public Folder in my Outlook.
I also think I am missing the Create Appointment part.
Can anyone help>

Set objOutlook = CreateObject("Outlook.Application")
Set MyFolder = objOutlook.GetNamespace("MAPI")
Set MyFolder = MyFolder.GetDefaultFolder(olPublicFoldersAllPublicFolders)
Set MyFolder = MyFolder.Folders("BrianCalPub")
Set objAppt = MyFolder.Items.Add


With objAppt
.Start = StartTime
.Subject = Me.Subject & " - " & Me.NEGOTIATOR
.Location = Me.Location
.Body = TextBody
.Duration = 0
.ReminderSet = True
.ReminderMinutesBeforeStart = 60
.Save
.Close (olSave)
End With
'Release the AppointmentItem object variable.
Set objAppt = Nothing
 
Make sure you have permissions on the folder to create items.
 

Users who are viewing this thread

Back
Top Bottom