Opening an existing message from a database query

Status
Not open for further replies.
J

Jon C

Using an SQL database (and lets say hypothetically MS access) and Outlook 2007.

What is the easiest way to automatically associate an email with the database?

The email subject lines will all be static and contain a USER_ID and MONTH field.

The same USER_ID and MONTH is also present in the database.

Provided both programs are open... Is it best to design a query that pulls the USER_ID and MONTH field out of the database and sends a command to Outlook to open all emails with subject lines that match this USER_ID and MONTH?

I'm open to any suggestions.. What is the best/easiest way to accomplish this automation? Any links provided would be greatly appreciated. .
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
With the Restrict or Find functions you can find items, for instance by

Subject, in a folder. But you need to know the folder or loop through every

possible folder.

An alternative would be to use the StoreID and EntryID. With that, and

provided that the message won't be moved, you can get it with the

GetItemFromID function.

Best regards

Michael Bauer

Am Tue, 18 Aug 2009 19:00:25 -0400 schrieb Jon C:


> Using an SQL database (and lets say hypothetically MS access) and Outlook


2007.

> What is the easiest way to automatically associate an email with the


database?

> The email subject lines will all be static and contain a USER_ID and MONTH


field.

> The same USER_ID and MONTH is also present in the database.

> Provided both programs are open... Is it best to design a query that pulls


the USER_ID and MONTH field out of the database and sends a command to

Outlook to open all emails with subject lines that match this USER_ID and

MONTH?

> I'm open to any suggestions.. What is the best/easiest way to accomplish


this automation? Any links provided would be greatly appreciated. .
>
 
Status
Not open for further replies.
Top