Results 1 to 3 of 3

Thread: Accessing Outlook using VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2001
    Location
    Singapore
    Posts
    8

    Thumbs up Accessing Outlook using VB

    Hi,
    I need some help on the Outlook. As I was only a beginner on VB, so i was lost. Please Help me... Pls..... =)

    I need to update info like contacts , calender retrieve from DB and update to the user's ms outlook.

    I have to let the user access thru the Net so i was required to use ActiveX.
    I can retrieve the data frm DB using ActiveX but i don't know how to update to the Outlook.

    i know need to use Outlook.Application..... but i was helpless coz i don't know how to use....

    so Can u help??
    Really appreciate it... =)

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    This will add an item to your contact list:

    Code:
    Option Explicit
    Dim oOutlook As New Outlook.Application
    
    Private Sub cmdAdd_Click()
        Dim oContact As Outlook.ContactItem
        With oOutlook
            Set oContact = .CreateItem(olContactItem)
                With oContact
                    .FirstName = txtFirst.Text & ""
                    .LastName = txtLast.Text & ""
                    .HomeAddressStreet = txtAddress.Text & ""
                    .HomeAddressCity = txtCity.Text & ""
                    .HomeAddressState = txtState.Text & ""
                    .HomeAddressPostalCode = txtZip.Text & ""
                    .Save
                End With
        End With
        Set oContact = Nothing
    End Sub
    
    Private Sub Form_Unload(Cancel As Integer)
        Set oOutlook = Nothing
    End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2001
    Location
    Singapore
    Posts
    8

    Thanxxx

    Thanx
    i will try it...

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