Outlook Calendar Control Needed

music_al

Registered User.
Local time
Today, 01:13
Joined
Nov 23, 2007
Messages
200
I am currently recording patient's appointment dates and times in table via a form by having 2 separate controls; a date text box and a time text box.

I still have to use Outlook to display the appointments in a Calendar form (double entry of data is annoying) as I cant find a Calendar control where I can see a week in view. Id like to enter...

  • Date
  • Time
  • Duration
via the Calendar control.

Does anyone know how I can do this ? Ive tried inserting an Active X Control but its saying the object isnt installed or something like that.

Regards

Al
 
Thank you for this.

I did find the same article and I followed it.

I created a blank form
Inserted the Calendar View Control
Named the Calendar control "ocxOutlookView"
Added the code to the Form Load event

Me![ocxOutlookView].Folder = "Calendar"Me![ocxOutlookView].View = "Day/Week/Month"
but I was getting an error saying "There is no object in this control" and then the debugger appears.

Do you have any ideas ?

Thank you

Al
 
Hi Al

This is the code I'm using to add appointments to a group calendar.
I select a date on the embedded code, click a button which then call the code below which then saves the appoinment:

Private Sub btnCreateAppointment_Click()
Dim OutlookApp As Outlook.Application
Dim Appointment As Outlook.AppointmentItem
Dim OutlookNms As Outlook.NameSpace
Dim OutlookPST As Outlook.MAPIFolder
Dim OutlookCalendar As Outlook.MAPIFolder
Dim OutlookExplorer As Outlook.Explorer
Set OutlookApp = CreateObject("Outlook.application")
Set OutlookNms = OutlookApp.GetNamespace("MAPI")
Set OutlookPST = OutlookNms.Folders("Archive Folders")
Set OutlookCalendar = OutlookPST.Folders("Calendar")
Set Appointment = OutlookCalendar.Items.Add
Appointment.Subject = "Hello"
Appointment.AllDayEvent = True
Appointment.Body = Me.txtNotes
Appointment.Start = Me.OutlookControl.Object.SelectedDate
'Appointment.Start = "20/09/2011 12:00"
'Appointment.End = "21/09/2011 12:00"
Appointment.Save


The above code has been pieced together from many sources so may not be the best way of doing it, but it works for me on Access 2003.

Hope this helps

Kristian
 
Hi -

Try a Google on Anytime Organizer. I've used it for years and I suspect you'll find it provides what you're after.

Best wishes - Bob
 

Users who are viewing this thread

Back
Top Bottom