CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2009
    Posts
    98

    [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

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Send Microsoft calendar appointment vb6

    You could SYNC it with a LIVE.COM account. Our local Windows User Group has a Group Calendar there...
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Aug 2009
    Posts
    98

    Re: Send Microsoft calendar appointment vb6

    OK, so with Microsoft Outlook, it would not work. Right?

  4. #4
    Join Date
    Aug 2009
    Posts
    98

    Re: Send Microsoft calendar appointment vb6

    I will take a look about that: You could SYNC it with a LIVE.COM account.

    I dont know much about LIVE,COM

  5. #5
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Send Microsoft calendar appointment vb6

    Sample:
    Attached Images Attached Images  
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  6. #6
    Join Date
    Aug 2009
    Posts
    98

    Re: Send Microsoft calendar appointment vb6

    ah! ok let me try something here.

  7. #7
    Join Date
    Aug 2009
    Posts
    98

    Re: Send Microsoft calendar appointment vb6

    Hello dglienna

    Thanks again for your help, i will now use a LIVE.COM account.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured