psbsmms
Programmer
- Dec 14, 2001
- 74
I have found several helpfull post here to achomplish what i am triiing to do.
1. Trying to add calendar item to outlook from access.
2. the calendar needs to be shared with all, no-exchange.
3. The calendsar needs to be the same on all computers because all the individuals add, edit and delete items, so it can't be anyones default calendar.
I have set up net folders and when i enter items directly into outlook they work fine.
When i try and automate the function useing code I found on here and Microsoft I can add to my default calendar but I can't seem to get it to add or even find the added on calendar. I am using Acess2k, windows xp pro, and no exchange server.
Here is my attemp(s) so far
i tried the post #705-662115, but it only appears to work in an exchange enviroment
Below is thge code I've been playing with, it has been through several revision and i thought i had it at one point and erased some of my other attemps. i thought the pick method would return me the folder to put it in and it does but either outlook or VB ignores the variable when adding the calendar item. This code below works to add to default calandar, howvever I need it added to the Job schedule calendar.
Dim appOutlook As Outlook.Application
Dim OutNamespace As Outlook.NameSpace
Dim MyItem As Object
Set appOutlook = New Outlook.Application
Set NameSpace = appOutlook.GetNamespace("MAPI").PickFolder
'Set MyNewFolder = NameSpace.Folders("Job schedule")
'Set myrecipient = NameSpace.PickFolder
'Set myrecipient = myrecipient.Folders("Job schedule")
'Set MyFolder = NameSpace.Folders(myrecipient)
Set MyItem = appOutlook.CreateItem(olAppointmentItem)
MyItem.MeetingStatus = olMeeting
MyItem.Subject = "test From Access"
MyItem.Location = "Store Name and Number"
MyItem.Start = #3/4/2005 8:00:00 AM#
MyItem.Duration = 4320
MyItem.Save
Any help would be appreciated
1. Trying to add calendar item to outlook from access.
2. the calendar needs to be shared with all, no-exchange.
3. The calendsar needs to be the same on all computers because all the individuals add, edit and delete items, so it can't be anyones default calendar.
I have set up net folders and when i enter items directly into outlook they work fine.
When i try and automate the function useing code I found on here and Microsoft I can add to my default calendar but I can't seem to get it to add or even find the added on calendar. I am using Acess2k, windows xp pro, and no exchange server.
Here is my attemp(s) so far
i tried the post #705-662115, but it only appears to work in an exchange enviroment
Below is thge code I've been playing with, it has been through several revision and i thought i had it at one point and erased some of my other attemps. i thought the pick method would return me the folder to put it in and it does but either outlook or VB ignores the variable when adding the calendar item. This code below works to add to default calandar, howvever I need it added to the Job schedule calendar.
Dim appOutlook As Outlook.Application
Dim OutNamespace As Outlook.NameSpace
Dim MyItem As Object
Set appOutlook = New Outlook.Application
Set NameSpace = appOutlook.GetNamespace("MAPI").PickFolder
'Set MyNewFolder = NameSpace.Folders("Job schedule")
'Set myrecipient = NameSpace.PickFolder
'Set myrecipient = myrecipient.Folders("Job schedule")
'Set MyFolder = NameSpace.Folders(myrecipient)
Set MyItem = appOutlook.CreateItem(olAppointmentItem)
MyItem.MeetingStatus = olMeeting
MyItem.Subject = "test From Access"
MyItem.Location = "Store Name and Number"
MyItem.Start = #3/4/2005 8:00:00 AM#
MyItem.Duration = 4320
MyItem.Save
Any help would be appreciated