Send e-mail via macro

R

RobinK

Excel 2003, SP 2

In cell A1 I have a date. If that date is greater than or equal to Today -
7 days, then I want to send an e-mail to the recipient in cell A2 (this cell
already has a hyperlink to the e-mail address), and attach the document in
cell A3 (which also contains a hyperlink to the document). Of course, the
references (A1, A2, A3) will be to the same columns but different rows as the
spreadsheet is populated.

I would like the subject of the e-mail to be automatically filled in as
“Please Review,†the body of the e-mail to say “Please review the attached
document and return to me as soon as possible,†and the cc: field
automatically populated with another e-mail address.

I’ve figured out how to activate the hyperlink in cell A1, but cannot figure
out how to:

1. Attach the document that’s hyperlinked in cell A3
2. Automatically populate the subject line, the body of the e-mail, and the
cc: field.

Ultimately, this macro would run on the “on open†event. Consequently, I
have no idea (or even how to search the discussion groups) how to find all
instances in the worksheet that meet the criteria of Today - 7 days.

Here’s what I have so far:

Dim CalDate As Integer

CalDate = 7

If Today - A1 <= CalDate Then

Range("A2").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True

End If

End Sub

Thanks in advance for your help!
 

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