PDA

View Full Version : hyperlink Outlook attachments to access form



Trevor
12-11-2007, 02:27 PM
Hi,
I am using MS access and outlook 2003; access will open outlook read unread mail, download any attachments to a folder ie c:\my documents\*.* and place the body, subject sender, and date sent in an access form. what I would like to do is after the attachments are downloaded for the email that is currently beeing "read" by access is to then have a list box autopopulate with a hyperlink (the link text is the file name it was saved as), and the link would then open the file for that end user).
this is for government use so I don't have acess to add code anywere other than my ms access project.
I have sucessfully have access set up to read outlook messages, but currently does nothing with attachmenst.
I do not have any code for this to post.
Any code will help. if there is already a therad on this please send me the link.
thank you.

Trevor
12-15-2007, 05:16 PM
Here is the code I am using to display files that are downloaded into a listbox but the problem with the code is that it displays every files in that folder in the listbox, can somebody help me?, Im trying to get it to display only the files that were downloaded from the current email in the listbox.
and is it possible to hyperlink the file name in the list box so that the end user would only have to click the hyperlink and it would open the corresponding file? also I would like the hyperlink to disappear if the file does not exist in that location.
Dim file As String
Dim files As String
files = ""
file = Dir$("C:\Temp\*.*")
While Len(file) > 0
files = file & ";" & files & ";"
file = Dir$
Wend
attachments.RowSource = files
End sub