|
-
December 22nd, 2011, 06:25 PM
#1
[RESOLVED] Send Microsoft calendar appointment vb6
Hello all
I'm having a code that creates an appointment in microsoft outlook. See code bellow.
But now, what i want to do, is to be able to also send that calendar appointment to another email address. It would be in the attachment.
That way, the other person will be able, by double click on it, to also add that appointment in his Microsoft calendar.
Is that possible?
how can i do that?
Thanks again for your help.
Code:
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("email address")
Set OLAppt = OLApp.CreateItem(olAppointmentItem)
OLAppt.Location = "*"
OLAppt.Subject = "VIN"
OLAppt.Body = "For " & Format(DTPicker1, "dddd mmm dd") & _
" " & "ASD Run Time: " & "asd_rune_time" & _
vbLf & _
vbLf & _
"Do not change any carriers in the CARRIERS / ACTIVATED CARRIERS tab" & _
vbLf & _
vbLf & _
vbLf & _
"carrier_names" & vbLf & _
vbLf & _
vbLf & _
vbLf & _
vbLf & _
vbLf & _
vin_note.Text
OLAppt.Start = CDate(DTPicker1 & " " & Format(DTPicker3, "hh:mm"))
'OLAppt.End = CDate(DTPicker2 & " " & Format(DTPicker4, "hh:mm"))
'OLRecipient.Priority = oPriority
OLAppt.Save
Set OLAppt = Nothing
OLNameSpace.Logoff
Set OLApp = Nothing
Set OLNameSpace = Nothing
Set OLRecipient = Nothing
MsgBox ("Sauvegarder dans Microsoft Outlook")
End If
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
|