Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

programaticaly updateing calendars

Status
Not open for further replies.

Loop1

Programmer
Apr 18, 2001
4
0
0
GB
could some one tell me if there is a way of making appointments with out sending an email. also is it possible to have a team calendar to which all appointments are made that then updates personal calendars with any appiontments to which they have been invited? or if any one know a web sight that is exchange/outlook calendar orientated?
 
Here is some code straight from an application that works. Users have to have rights to the calendar that they write to. Hope this helps. Be sure to include the outlook object module in your project references.


Dim olApp As Outlook.Application
Dim olappt As Outlook.AppointmentItem
Dim olNameSpace As Outlook.NameSpace
Dim olRecipient As Outlook.Recipient
Dim SendTo As String
Dim mystart As String
Dim myend As String
Dim mySQL As String
Dim NewID As Long

SendTo = "Burnham, Paul"

mystart = txtSetup(1).Text & Space(1) & cboSetup(0).Text & Space(1) & lstSetup(0).Text
myend = DateAdd("n", 15, mystart)

Set olApp = New Outlook.Application
Set olNameSpace = olApp.GetNamespace("MAPI")

Set olRecipient = olNameSpace.CreateRecipient("Burnham, Paul")
Set olappt = olNameSpace.GetSharedDefaultFolder(olRecipient, olFolderCalendar).Items.Add

With olappt
'Create the setup appointment
.Location = txtSetup(0).Text
.Subject = "Hardware setup"
.Body = txtSetup(3).Text
.Start = CDate(mystart)
.End = CDate(myend)
.ReminderMinutesBeforeStart = 15
.Save
End With

'Release the Outlook object variable

Set olappt = Nothing
Set olNameSpace = Nothing
Set olApp = Nothing
Set olRecipient = Nothing

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top