I have some code which saves emails into a database, creates new folders for new senders etc etc but what I now want to do is when a new email comes in, i want any attachments to be saved into a table (by saving the location and then having the ability to go back in and open it from that location)... All I really need is the code which will show the filepath... does anybody know how to do this?
I currently have the below code which saved the email body, subject, time/date etc into my table tbl002_SupportRequest.
I want to be able to save the attachment location into tbl003_Attachments in a similar way... hopefully by passing in the path using a recordset, my problem is that I can't refer to the file path... I have tried using attachment.pathname but can't get it to work... apparently it must be a linked file but I'm not too sure what making it a linked file entails...
Any replies appreciated.
Thanks,
Rebecca
I currently have the below code which saved the email body, subject, time/date etc into my table tbl002_SupportRequest.
Code:
rstSupportRequest.AddNew
strRequestID = rstSupportRequest!RequestID
rstSupportRequest!emailaddress = MailObject.SenderEmailAddress
rstSupportRequest!Subject = MailObject.Subject
rstSupportRequest!Request = MailObject.Body
Debug.Print MailObject.Body
rstSupportRequest!RequestDate = MailObject.ReceivedTime
Debug.Print strRequestID
I want to be able to save the attachment location into tbl003_Attachments in a similar way... hopefully by passing in the path using a recordset, my problem is that I can't refer to the file path... I have tried using attachment.pathname but can't get it to work... apparently it must be a linked file but I'm not too sure what making it a linked file entails...
Any replies appreciated.
Thanks,
Rebecca