A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Calandaring
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Adding appointments to different Outlook calendars from Access



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 16th 08, 10:48 PM posted to microsoft.public.outlook.calendaring
Paul Access VBA
external usenet poster
 
Posts: 1
Default Adding appointments to different Outlook calendars from Access

I am using vba with Access 2007 to add appointments to an Outlook 2007
Calendar. This is working fine when I add the appointment to the main
Outlook calendar. However, I have 4 different calendars in the one Outlook,
and I want to be able to choose which outlook calendar I add the appointment
to. Can you tell me how to choose which calendar the appointment will go to?
thanks for your help! (If this isn't the correct forum for this, please let
me know which one is) thanks-Paul

The code I'm using currently is below.

On Error GoTo Add_Err
'Save record first to be sure required fields are filled.
DoCmd.RunCommand acCmdSaveRecord
'Exit the procedure if appointment has been added to Outlook.
If Me!AddedToOutlook = True Then
MsgBox "This appointment is already added to Microsoft Outlook"
Exit Sub
'Add a new appointment.
Else
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![Date to Arrive] & " " & #9:00:00 AM#
.Duration = 1920
.Subject = Me.Last__First
.body = Me!Notes
End With
Set objAppt = Nothing
End If
Me!AddedToOutlook = True

MsgBox "Appointment Added!"
Exit Sub
Add_Err:
MsgBox "Error " & Err.Number & vbCrLf & Err.Description
Exit Sub

  #2  
Old May 19th 08, 04:33 PM posted to microsoft.public.outlook.calendaring
Brian Tillman
external usenet poster
 
Posts: 17,452
Default Adding appointments to different Outlook calendars from Access

Paul Access VBA Paul Access wrote:

I am using vba with Access 2007 to add appointments to an Outlook 2007
Calendar.


You might find it helpful to ask in microsoft.public.outlook.program_vba
where the programmers abide.
--
Brian Tillman [MVP-Outlook]

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding and setting appointments in Outlook using C# Andrew Mercer Add-ins for Outlook 1 March 13th 08 07:07 PM
Adding Contacts to Outlook Web Access GeneShim Outlook - General Queries 1 October 4th 07 09:17 PM
Adding an Outlook task from Access Blogd_Node Outlook and VBA 6 June 7th 06 04:33 PM
adding appointments to 2 calendars at the same time? greg in sacto Outlook - Calandaring 1 March 23rd 06 03:04 PM
Adding graphics to Outlook calendars? ggg98 Outlook - Calandaring 1 January 14th 06 06:27 PM


All times are GMT +1. The time now is 11:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.