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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't find outlook inbox attachments field

Status
Not open for further replies.

Pack10

Programmer
Feb 3, 2010
495
US
I have linked to an Access Inbox, and would like to bring into my database the email attachments. The linked table which is the mailbox does not have the attachments field.
Does anyone know where the attachments from the INBOX get stored, and how does one access them.
 
I didn't know Access had an inbox. Are you sure you aren't using Outlook?

Ni neart go cur le cheile.
 
sorry, i linked to an OUTLOOK inbox using Access 2007.
I am surprised that the linked table does not have the attachment field. When you have attachments in a field, you can see the attachment by clicking on the paper clip icon. I want to see that in the table I create from the linked inbox.
 
I want to bring in the inbox with the attachments with the idea that a user will "assign" the work to someone in her group. I have loaded a table with the emails from the inbox, but I would like to have the attachment so the user could simply click on the paper clip icon and see the attachment. There is a field "Has Attachments" but i don;t see an attachment field in the INBOX...but as we all know there are attachments in the folder. Can someone shed some light here. Thanks much.
 
I don't do much with Outlook, but the contents of the attachment, and message body, are not part of the data you get when you link the inbox to Access. I would imagine you will need to reference the Outlook library, and write (or search for) some VBA to enumerate through the emails & attachments, probably using the File System Object. Sorry I'm not more help here, but hopefully, a nudge in the right direction. Either way, the data you want is not stored in the linked inbox table.

Ni neart go cur le cheile.
 
I do not think this can be done without code. I may be wrong so I will let someonelse chime in. This can be done in code. You will have to loop the mail items in the inbox and then loop the attachments in the mail item. Then build a hyperlink to that attachment, and use an insert query to insert the path to the attachment in a related table. The code to find all attachments related to a mail item is here
The rest is relatively easy.
 
Can anyone provide some help with the hyperlink to the attachment, I cant find any sample code. I have the attachments in a folder...I really want to store them to attachment field.
 
I actually got this to work. I used code to parse the email message and save the name of the file attached to a field in the table. On my user form, they can click on the file name and invoke a shell command loading excel or Word.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top