A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Opening an existing message from a database query



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 19th 09, 01:00 AM posted to microsoft.public.outlook.program_vba
Jon C[_2_]
external usenet poster
 
Posts: 2
Default Opening an existing message from a database query

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. .
Submitted using http://www.outlookforums.com
Ads
  #2  
Old August 19th 09, 08:58 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Opening an existing message from a database query



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 - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: http://www.vboffice.net/product.html?pub=6&lang=en


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. .
Submitted using http://www.outlookforums.com

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook message preparation query eric Outlook Express 10 April 23rd 09 02:02 AM
import existing database to outlook doublethought Outlook - Using Contacts 1 September 25th 07 11:16 AM
Query re Outlook 2000 message formatting... D.R. Outlook and VBA 1 September 15th 07 02:32 PM
OE6 message query.... shoil Outlook Express 1 January 24th 07 04:32 AM
Message rule query mikey Outlook Express 6 April 11th 06 08:12 PM


All times are GMT +1. The time now is 08:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.