Access 2000 programming - writing data to an Outlook contacts public folder
Results 1 to 3 of 3

Thread: Access 2000 programming - writing data to an Outlook contacts public folder

  1. #1
    Join Date
    Jul 2000
    Location
    Toronto, Ontario, Canada
    Posts
    181

    Access 2000 programming - writing data to an Outlook contacts public folder

    I am trying to write some contact info from an Access 2000 database into to an Outlook 2000 contact Public folder. I've got the VB code set up in a module within the access database. As part of the process I have the following code:

    .Account = snpContacts![Client Number]
    .Company = snpContacts![Alias Name]
    .FirstName = snpContacts![First Name]
    .LastName = snpContacts![Last Name]

    '-- Copy the email address field if it was entered in the database, make it blank if not

    If IsNull(snpContacts![Phone Number]) Then
    .[E-Mail] = ""
    Else
    .[E-Mail] = snpContacts![Phone Number]
    End If

    The process bombs with a Run-time error 438: "Object doesn't suppor this property or method" on the lines beginning

    .Company =

    and
    .[E-mail] =

    If I comment these lines out then the code runs fine. The Company and E-mail fields are in the list of contact item fields. Why would this error occur particularly with these two items? How do I fix this?
    Thanks for your help.

  2. #2
    Join Date
    Jul 2000
    Location
    Toronto, Ontario, Canada
    Posts
    181
    Problem solved. I had the incorrect variable names.
    FYI: use "Companyname" instead of "Company"
    and "Email1Address" instead of "E-Mail".
    (the number 1 between Email and Address)

    Although the names in Outlook are "Company" and "E-Mail", you must program them with the other names.

  3. #3
    Join Date
    Apr 2000
    Location
    UT, USA
    Posts
    463
    Thanks for posting back..I've been watching this one!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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