Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Manipulating Outlook from Access - Code to refer to selected mail item

Status
Not open for further replies.

RichardWebster

IS-IT--Management
Jul 12, 2006
4
GB
I am running an Access 2000 database with forms with buttons on that create docs in Word etc and I now want to use it to help with Outlook.

I am a lawyer and I keep all the documents (inc e-mails to and from clients and other contacts) to do with a client's matter in a subfolder for that matter which uses a format derived from information in a record on an Access form. I have a function MWP which is the path for the sub folder for the matter whose record is currently shown on an access form. I use this for saving newly created letters in WORD to that subfolder:

oApp.ActiveDocument.SaveAs FileName:=MWP() & sDtCode
(Where sDtCode is the Name of the Particular letter etc)

I want to be able to save incoming and sent e-mails quickly to the right folder as I deal with them. At the moment I have to tediously open the e-mail and then SAVE AS and navigate to the appropriate sub folder which invovles quite few mouse clicks.

I have added the reference to the Outlook libaray in Access VBA and can defintely do something like sending e-mails (having copied code supplied on various websites.) What I can't seem to do is refer to an e-mail that is open so that I can Save As. Also it would be even better if I could simply highlight the particualr e-mail in the inbox without opening it and save it to the fodler for the matter whose record is currently open on the Access Form.

What I can't get my head round is precisely how you refer to the currently open e-mail or the one that is slected/highlighted in the inbox or sent items list.

Can anyone help?
 
Thanks I've got somewhere with inspector but Im not that clear how it actually works! I'll press on and see if I can make it do what I want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top