Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Send e-mail via macro

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.

Ive figured out how to activate the hyperlink in cell A1, but cannot figure
out how to:

1. Attach the document thats 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.

Heres 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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Send e-mail via macro

hi robin,
see this site.
http://www.rondebruin.nl/sendmail.htm
email anyway you want to. has sample code, downloadable example files ect.

Regards
FSt1


"RobinK" wrote:

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.

Ive figured out how to activate the hyperlink in cell A1, but cannot figure
out how to:

1. Attach the document thats 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.

Heres 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!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Send To: Mail Recipient without Macro Angel_24477616 Excel Programming 0 March 29th 07 01:00 PM
Macro to send a mail to outlook [email protected] Excel Discussion (Misc queries) 1 August 24th 06 12:48 PM
How can I automate an e-mail to be send in macro? john Excel Discussion (Misc queries) 6 January 25th 06 08:40 PM
using macro to send e-mail bob777 Excel Discussion (Misc queries) 1 November 2nd 05 11:16 PM
Create and Send e-mail using macro Tom Ogilvy Excel Programming 0 August 6th 04 04:09 PM


All times are GMT +1. The time now is 02:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"