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

How to send an Outlook email from Excel 2

Status
Not open for further replies.

btinder

Programmer
Mar 12, 2004
27
US
I've got a worksheet with 3 columns:

A. User Name
B. How many days left until their password expires
C. Date of their password expiration.

I'd like to be able to run a macro which determines if anybody has their password expiring in the next 10 days. So if column B contains a 10 or less, then fire off an email saying that they need to change their password.

I'll probably add a column D with the username's email address, so basically the VBA code will use column D to get the email, and insert Column C's date of expiration in the resulting email message.

Can this be done? I've searched the net and have found brief references, but nothing quite like this. Any help would be greatly appreciated. Thanks!
 
Skip,

Thanks for the link, it helped me immensely.

How would I go about writing a function to call the CreateMail function once the conditions are met?
 


Code:
Sub testt()
    CreateMail Array("SkipVought@bell.com"), "Your Report is on your printer", ""
End Sub

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
Hi,

I'm trying to make use of the above for something similar.

What reference do you need to add and how do you do it?

Cheers,

Andrew
 
SkipVought said:
MS Outlook OBject library via Tools/references in the VB Editor.

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top