Selecting Spreadsheet Cell Information for e-mail

G

Guest

I send e-mails daily and provide specific information from an attached
spreadsheet from select cells within the same spreadsheet. I would like to
write code that would concatenate the information together in an e-mail,
automatically filling in the subject lines and sending.

Here is what the process would be like:
1. I open the spreadsheet attachment. Check cell A1.
2. Close the spreadsheet attachment.
3. Forward the e-mail; the subject line remains the same.
4. The message is something like: "Your information is " & Cell A1
5. I would also need to format the information that was added using a number
format.

Any ideas?
 
M

Michael Bauer

Am Thu, 27 Jul 2006 07:53:02 -0700 schrieb csergent:

Please add a ref to Excel to your Outlook VBA project (via
Tools/References). Then you can see Excel's objects, methods etc. in the
Object Browser (F2). From there you can also get easily help and examples.

Now you're able to read the help for some keywords:

1. a) First you need to save the attachment as a file: SaveAsFile (method of
the Attachment object)
1. b) Then you need to open that Workbook: Open function
1. c) The content is in the Workbook's Range("a1").Value

2. Close (method of the Workbook object)

3. Forward (function of the MailItem object that returns a new MailItem)

4. Write that info into the MailItem's Subject property

5. Use the Format function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top