Is there away of creating an appiontment in Outlook, from VB6, without having to run up Outlook!? I've tried running up outlook without .display and then create an appiontment....but it doesny work!!
Can anybody help!!?
Thanks
Archi!
Printable View
Is there away of creating an appiontment in Outlook, from VB6, without having to run up Outlook!? I've tried running up outlook without .display and then create an appiontment....but it doesny work!!
Can anybody help!!?
Thanks
Archi!
No, you can't. Yes I can. I manipulate calendars, task lists, and E-mail in outlook all of the time without showing the user Outlook.
Private Sub Form_Load()
Dim OLApp As Outlook.Application
Dim OLNameSpace As Outlook.NameSpace
Dim OLRecipient As Outlook.Recipient
Dim OLAppt As Outlook.AppointmentItem
Set OLApp = New Outlook.Application
Set OLNameSpace = OLApp.GetNamespace("MAPI")
olNameSpace.Logoff
olNameSpace.Logon "Logon Name", "Password", False, True
Set OLRecipient = OLNameSpace.CreateRecipient("Recipient Name")
Set OLAppt = OLNameSpace.GetSharedDefaultFolder(OLRecipient, olFolderCalendar).Items.Add
OLAppt.Location = "Location"
OLAppt.Subject = "Subject"
OLAppt.Body = "Testing for calendar add"
OLAppt.Start = CDate("12/31/00 01:00 AM")
OLAppt.End = CDate("12/31/00 01:01 AM")
OLAppt.Save
Set OLAppt = Nothing
OLNameSpace.Logoff
Set OLApp = Nothing
Set OLNameSpace = Nothing
Set OLRecipient = Nothing
End Sub