Macro to open attachments

Manc

bitten, more than, chew!
Local time
Today, 16:00
Joined
Jan 11, 2010
Messages
25
Hi there,

I'm after a macro that when the user clicks on an item in the first column of a subform, it displays the attached file, if there is one.

Any ideas?

Thanks for your help
Manc
 
What are the attachments, are they word documents or excel files, as you can use the create object.

Look at the attached database, what I have done is created a form that will show all documents in a location on my pc in a list box then when the user double clicks it will open the application and the file.

Good luck

Trevor
 

Attachments

Hi Trevor

Appreciate your comments and help.

The example you posted gives me a run time error, path not found.

What I am trying to achieve is the following:

All attachments are most likely to be *.jpg or *.bmp.
Fields in this table are JobID, Courier, Air Waybill No, and Attachments

Assuming the record has an attachment, rather than having to double-click the attachment, and then double-clicking again on the attachment to view it, is there a way I can apply a hyperlink to the Air Waybill No, than when that is clicked it displays the attachment?

Thanks
Manc
 
The database I sent you will have considered that any file for where the database was located, you could have also changed the double click event to on click, however having said this, sometime ago I recall having to use labels to activate hyperlink items that were held as attachments.

I will have a look to see if I can find a copy of the code, but you will have to look to see if you are storing all images in a central folder as this will make it easier to recall and activate to show said image's and types.

Trevor
 

Users who are viewing this thread

Back
Top Bottom