Transferring Outlook Information To or From a Database

Many companies use Microsoft Access or SQL Server to store contact or product information. You can use Outlook custom forms to take information from or write information to a database using ADO (ActiveX Data Objects). In the following example, information from the Frame Order System is transferred to an Access database for reporting purposes:

 Sub cmdSubmit_Click() Dim objConnection Dim objRecordset Dim strSQL Set objConnection = CreateObject("ADODB.Connection") objConnection.Mode = 3 objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data_ Source=\\server\f\Frames.mdb;" strSQL = "SELECT * FROM FrameInformation;" Set objRecordset = CreateObject("ADODB.Recordset") objRecordset.Open strSQL, ...

Get Special Edition Using® Microsoft® Office Outlook® 2003 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.