We help IT Professionals succeed at work.

Excel send email with specific fields

casscar
casscar used Ask the Experts™
on
Hi all,

I have the attached excel sheet and I would like that as soon as the user clicks the request link and email is sent stating the Book Title and ISBn and emails it to a particular email address.

How can this be done? I would not like to send the entire workbook.

Regards,
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
Soory i forgot the attachment
Book2.xlsx

Commented:
Have a look at the atatched workbook.

Thanks

Scot
27677588.xlsm

Commented:
Forgot to mention one thing...

If you put the email adderss in the code so it can send without the user reviewing the message first, change the line .Display with .Send and the message will go immediately.

HTH

Scot

Author

Commented:
Hi,

I am trying to use the attached but as soon as i press on request, the below error is displayed:

"Compile error: Can't find project or library"

Is there something i can try?

Commented:
Are you using Outlook as your email client?

What version of Office are you using?

Author

Commented:
I am using Microsoft Outlook 2007 and Excel 2007

Commented:
Then the code I supplied will work with a little modification.... it needs to reference your versions.

Open the spreadsheet and press Alt-F11, this will open the code window.
In the left hand pane double-click on Sheet1.There you'll see the code that needs to be modified for the recipient and message body etc...
Click Tools --> References
Uncheck anthing that says MISSING in front of it.

Then scroll the window and click replacements for your version - bacically anything that was office 14 with Office 12.

Scot

Author

Commented:
Hi i unticked the Missing thick option but i cannot find the replacements for your version.

Can you please guide me?
Commented:
Not my version - your vesion, Office 2007 would be Offcie 12.

You need to select Microsoft Excel 12, Microsoft Office 12 and Microsoft Outlook 12.

Author

Commented:
Perfect it worked :) thanks for your kind help.

Commented:
You're very welcome!