alexr114 said:
Ive got a customer table which has email addresses and general information
including a link to another table with a product list on it. Is there
anyway
to link a query for a certain product into outlook so that an email can be
sent to them and that if the query product is changed then the email will
be
sent to the new lot etc
You'll find it easier to store the email addresses in Access. But, once I
used a public folder in Outlook to store specific information on our
contacts, I used automation from Outlook on an Exchange server to add the
records to an Access table.
Then I linked back to the Outlook data from a command button on a form. The
linking ID was a 128 character GUID string (ExchangeEntryID in the code
below). Set a reference to the Outlook object library:
Private Sub cmdOutlook_Click()
Dim olApp As Object
Dim nsMAPI As NameSpace
Dim fldr As MAPIFolder
Dim i As Integer
Dim contractor As Object
Dim EntryID As Variant
Set olApp = GetObject("", "Outlook.Application")
Set nsMAPI = olApp.GetNamespace("MAPI")
Set fldr = nsMAPI.Folders("Public Folders").Folders("All Public
Folders").Folders("Contractors")
EntryID = DLookup("ExchangeEntryID", "tblContractor", "[ContractorID] = '" &
Me.txtContractorID & "'")
If Not IsNull(EntryID) Then
Set contractor = nsMAPI.GetItemFromID(EntryID, fldr.StoreID)
contractor.Display
Else
MsgBox ("This contractor is not available in the Outlook folder.")
End If
End Sub
The biggest problem was that all the users had access to Outlook and they
were able to add and delete entries which would often cause problems with
the rest of the database. Eventually, newer versions of Exchange didn't
properly edit changes and sync them so we abandoned the connection and just
kept a good set of data in Access. Of the 1800 or so records in Access, only
400 were usable, and 180 of those were our current active data set. The rest
of the records just take up space.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access