Sending an email on workbook save

  • Thread starter Thread starter matpj
  • Start date Start date
M

matpj

HI,
I have a work logging spreadsheet that allows me to keep track of
outstanding items.
The assignee of the tasks are chosen using a static drop down list
(data validation)

I'm hoping for an automated email to be sent to the persion I assign a
task to, containing the contents of several cells (and a standard
subject line)
Is this possible?

can anyone give me any tips/advice/code?

thanks in advance,
Matt
 
This is a broad brush at the syntax to send e-mails. You have to firs
load the Outlook library, and can then use all the commands o
Outlook.


Set OutlookApp = Outlook.Application
Set MItem = OutlookApp.CreateItem(olMailItem)
With MItem
.To = "e-mail address" (or cell reference)
.Subject = "Hot Line pivots are updated" (or cell reference)
Msg = "Hot Line pivots are updated" & vbCrLf (or cel
reference)
Msg = Msg & "next line" .Body = Msg
.Send
End Wit
 
thanks for the response, guys.
I use Notes here.
is there a Notes library that you are aware of?
 
thanks fo the links.
I've successfully adapted the code to send Notes email.

my new problem is trying figure out how to make it include only NEW
items in the email.

Typically when I open the spreadsheet, i'll add a work item at the
bottom, and assign the resource.
when I assign the resource (or possibly when I save or exit the work
log) I need the email to be created only with any new items for that
person.

any good ideas?
I could create a new worksheet with the new work item reference in A1,
then each other new item I add will be inserted in the cell below.

On worksheet exit this could be erased.
then my email item could look at the new worksheet as a range.

although i'm not sure what action I would use to get Excel to copy the
work item on to the new worksheet.. (i'm thinking out loud here!)

alternatively, I create an Access form, that I enter the details in.
On the save button this item is then apended to my work log AND an
email is sent out.

any suggestions (the simpler the better!)
 

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

Back
Top