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

Creating Email With Image Attachment 1

Status
Not open for further replies.

LarryDavidow

Technical User
Apr 22, 2002
56
US
I have a BLOB OLE Object field in one of my tables which I am using to store JPEG images. The JPEGS are linked to the field as the images get updated quite frequently. Each record has a different image linked to the BLOB OLE Object field. I have the images placed on my form, but I would like to be able to click or double click on the image and have it bring up a new mail message with the respective image attached in the message.

Can someone please help me with the necessary code...

Thanks
 
That's a fairly complex request for coding and I would help if I had more time today. I think I can point you in the right direction, however, and maybe someone else here can cobble together some code. Basically you will need to do something with an onDouble event of the BLOB field that references another field containing the email address, brings up the mail client, copies the image, then pastes it into the new mail object. This is off the top of my head. I'm betting Tony has a better idea as he does a lot of that sort of thing.



Mac :)

"Do not delve too deeply in the arts of your enemy and so become ensnared by them"

langley_mckelvy@cd4.co.harris.tx.us
 
Hey Mac

Thank you very much!!

A couple of things I wanted to add...

Firstly, I don't need it to pull data from an "email" field for the address. The user will select the address from an Outlook/Outlook Express contact.

Secondly, I would like the user to be able to select multiple images to be attached to a single email. I do know that once that Send Mail in Outlook opens, it will not let you back into Paradox until you close or send the mail. Maybe, a Logical field can be added to the table and based on that critria, the results can be combined into one email. To help you out, here is a description of the application.

I have created a database for a Modelling Agency. The database contains all of their models. The form I have created shows all the model's information as well as their picture.

The agency's clients will call and request pictures of models fitting specific criteria. This is where I want the user to be able to run the query, preview the results in the form and be able to send multiple images to the client in one email.

I do have a table and form for the agency's clients, so ultimately, I would like them to be able to select an email address from that table and send them the images, but all that can wait. For now, I can just have them import thier client's info into Outlook/Outlook Express.

Let me know what it would take to make this happen.

Again, thank you!

Larry
 
Okay, then you would need to 'publish' the report to Word97 or RTF format for compatibilty - see the publishTo() method in the ObjectPAL reference. Then you would use ObjectPAL to send the email over their mail client:

Code:
var 
   m Mail  ;Declare a variable to hold the message
endVar 	


m.addAddress("JDOE@Agency.com"); Add John Doe as addressee
m.setSubject("Models to Review")
m.setMessage("This document contains 5 models and photos")
m.addAttachment("MyPublishedReport.DOC") ; Attach the report
m.send() ; Send the message

This is a simplified version of what you could do, but it should point you in the right direction.



Mac :)

"Do not delve too deeply in the arts of your enemy and so become ensnared by them"

langley_mckelvy@cd4.co.harris.tx.us
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top