Hi Bobbbo,
Since you indicate that items 1 thru 5 are complete, I will focus on the Outlook front end only. What you want can be done in several ways including:
a. Excel Only. This means the Excel file would always be open, and the Excel file would poll Outlook periodically to determine if there are any Emails to be processing.
b. Outlook front end that gets triggered each time there is a new Email Item. Outlook would open Excel (which could incur some overhead each time Excel is opened).
Both solutions require similar code in Excel, because when Excel is triggered, Excel identifies which Emails to process. There may be better ways to do this as I am not an Outlook expert.
Processing is done for Emails that:
a. Have a Specific Subject
b. Are Unread
c. Have one or more Excel attachments
In the Outlook and Excel Macros there are constants that you have to modify to suit your needs:
In the Outlook ThisOutlookSession code module:
NOTE: For convenience, the Outlook code is included in a separate code module in the attached Excel File.
In the Excel File ThisWorkbook code module:
In the Excel File Ordinary Code Module ModOutlookFindEmail:
It is a best practice to declare all variables. If you misspell a variable in your code, VBA will silently assume it is a Variant variable and go on executing with no clue to you that you have a bug. Go to the VBA development window, click Tools, Options, and check "Require Variable Declaration." This will insert the following line at the top of all new modules:
This option requires all variables to be declared and will give a compiler error for undeclared variables.
Lewis
Bookmarks