Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / December 2005

Tip: Looking for answers? Try searching our database.

Outlook Integration

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
grep - 23 Nov 2005 19:30 GMT
I'm creating an application to manage client service contracts. I always
enter client information into Outlook, and would like to avoid having to
enter the same client information three times. (Yes, three times - I've
already resigned myself to having to enter the information in QuickBooks
manually.) I'd like to be able to click a button on my Access Client
Form, have it bring up my Outlook Contact List, and then autofill my
Client Form fields based on my Contact List selection.

I'm sure this is possible, but I have no clue as to how to go about it.
Any pointers?

grep
Graham Mandeno - 24 Nov 2005 21:55 GMT
1. Click on File > get external data > link tables

2. In "Files of type", choose "Outlook()"

3. Select the contacts folder from the browser tree and click Next>

4. Change the name for the local table if required, and click Finish

You can now access your contacts just as you would any other table.

On the QuickBooks problem:  I know nothing about QuickBooks, but a quick
Google for /QuickBooks ODBC "Microsoft Access"/ suggests that there are ways
to connect directly from Access to QuickBooks.  You might like to start with
this link:
http://www.qodbc.com/qodbcaccess.htm
Signature

Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

> I'm creating an application to manage client service contracts. I always
> enter client information into Outlook, and would like to avoid having to
[quoted text clipped - 8 lines]
>
> grep
don1 - 25 Nov 2005 08:41 GMT
Function ExportAccountToOutlook(AccountID As Long) As Boolean
   On Error GoTo ErrHandler
  ' Set up DAO Objects.
   Dim oDataBase As Database
   Dim rst As Recordset
   Set oDataBase = DBEngine(0)(0)
   Set rst = oDataBase.OpenRecordset("SELECT * FROM Accounts" _
   & " WHERE AccountID=" & AccountID, dbOpenSnapshot)

  ' Set up Outlook Objects.
   Dim ol As New Outlook.Application
   Dim olns As Outlook.Namespace
   Dim cf As Outlook.MAPIFolder
   Dim c As Outlook.ContactItem
   Dim Prop As Outlook.UserProperty

   Set olns = ol.GetNamespace("MAPI")
   Set cf = olns.GetDefaultFolder(olFolderContacts)
   
   If Not rst.EOF Then
       With rst
        ' Create a new Contact item.
           Set c = ol.CreateItem(olContactItem)

        ' Specify which Outlook form to use.
        ' Change "IPM.Contact" to "IPM.Contact.<formname>" if you've
        ' created a custom Contact form in Outlook.
           c.MessageClass = "IPM.Contact"

        ' Create all built-in Outlook fields.
           c.FullName = !FirstName & " " & !LastName
           c.FirstName = ![FirstName]
           c.LastName = ![LastName]
           c.HomeAddressStreet = !StreetAddress
           c.HomeAddressCity = !City
           c.HomeAddressState = !State
           c.HomeAddressPostalCode = !ZIP
           If !TelephoneA <> "" Then c.HomeTelephoneNumber = !TelephoneA
           If !TelephoneB <> "" Then c.BusinessTelephoneNumber = !TelephoneB
           If !Mobile <> "" Then c.MobileTelephoneNumber = !Mobile
           If !Email <> "" Then c.Email1Address = !Email
           c.Categories = "Account"
        ' Create the first user property (UserField1).
           Set Prop = c.UserProperties.Add("AccountID", olText)

        ' Set its value.
           Prop = ![AccountID]

        ' Save the contact.
           c.Save
           ExportAccountToOutlook = True
       End With
   End If

ExitHere:
   On Error Resume Next
   rst.Close
   Set rst = Nothing
   Set c = Nothing
   Set olns = Nothing
   Set cf = Nothing
   Set oDataBase = Nothing
   Exit Function
ErrHandler:
   MsgBox Err.Description & " " & Err.Number
   ExportAccountToOutlook = False
   Resume ExitHere
   
End Function

Enjoy...

> 1. Click on File > get external data > link tables
>
[quoted text clipped - 23 lines]
> >
> > grep
grep - 09 Dec 2005 07:34 GMT
That worked perfectly. Thanks, Graham.

grep

>  
> 1. Click on File > get external data > link tables
[quoted text clipped - 12 lines]
> this link:
> http://www.qodbc.com/qodbcaccess.htm
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.