|
-
Sep 22nd, 2000, 09:11 AM
#1
Thread Starter
New Member
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!
-
Sep 22nd, 2000, 01:32 PM
#2
Addicted Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|