Microsoft Excel - Email notification

Asked By Melanie
16-Aug-11 10:00 PM
Hi

Can I set up an cell in an excell spread sheet to email me a notification when a date value is due?

  Ravi S replied to Melanie
16-Aug-11 10:08 PM
HI

follow these steps

  1. In the menu, click on Tools, then Options.
  2. On the preferences tab, in the E-mail section, click on the “E-mail Options…” button
  3. Click on the “Advanced E-mail Options…” button
  4. Look for the “When new items arrive in my Inbox” area…
  5. Tick or untick all the notifications you want to receive.

Turn on or off new email notifications in Outlook 2007 - TheNewPaperclip.com

Note that there are four notifications that Outlook can give you when you receive an email in your Inbox

  • Play a sound
  • Briefly change the mouse cursor
  • Show an envelope icon in the notification area
  • Display a New Mail Desktop Alert (default Inbox only)

From the Advanced E-mail Options window, you can control each of these as you wish.  Now you wont get distracted by email when you want to be productive… or you know how to turn the notifications back on if you don’t feel like doing any work!

refer

http://www.howto-outlook.com/howto/newmailalert.htm

  Ravi S replied to Melanie
16-Aug-11 10:09 PM
Hi

A better solution is to create a generic rule with no conditions and just the action to display the Desktop Alert.

  1. Open the Rules and Alerts dialog;
    • Outlook 2003 an Outlook 2007
      Tools-> Rules and Alerts… (press OK if you get an HTTP warning)
    • Outlook 2010
      tab Home->  group Move-> button Rules-> Manage Rules & Alerts…
  2. Button New Rule
  3. Select "Start from a blank rule" and verify that "Check messages when they arrive" is selected.
  4. Press Next to go to the Conditions screen.
  5. Verify that no condition is selected and press Next.
  6. A warning will pop-up stating that this rule will apply to all messages. Press "Yes" to indicate that that is correct.
  7. Select the action "display a Desktop Alert".
  8. Press Finish to complete the rule.
  9. If needed move the "display a Desktop Alert" rule all the way to the top.

New Mail Desktop Alert rule (click on image to enlarge)
You can create a rule to show the New Mail Desktop Alert for each message that you receive. (click on image to enlarge)

  Vickey F replied to Melanie
16-Aug-11 11:29 PM
Assuming you are using Outlook (or possibly Outlook Express

The most information in one page is here:

http://msdn.microsoft.com/en-us/libr...ffice.11).aspx

Other pages to look at are:
http://www.ozgrid.com/forum/showthread.php?t=20166
http://www.rondebruin.nl/sendmail.htm
http://www.rondebruin.nl/mail/add-in.htm (some nifty add-ins to automate the whole thing)
http://www.dicks-clicks.com/excel/olSending.htm

Hope this will help you.
  Web Star replied to Melanie
16-Aug-11 11:45 PM
try something like this
Here's "test" tweaked a la Ron's "Mail_small_Text_Outlook".

Sub test()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

'strbody = ?

On Error Resume Next
With OutMail
.To = Cells(Sheets("DV source").Cells(1, 2), 13)
.CC = ""
.BCC = ""
.Subject = Cells(Sheets("DV source").Cells(1, 2), 3) & _
"- loan doc request status changed to ''" & Cells(Sheets("DV source").Cells(1, 2), 10) & "''"
'.Body = strbody
.Display
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
End Sub
  Anoop S replied to Melanie
17-Aug-11 12:32 AM
refer this code, use Cell A1 and will run the macro if the cell value <0

1) Right click on a sheet tab and choose view code
2) Paste the event below in the sheet module.
3) Alt-q to go back to Excel

Note: Change YourMacroName to the name of your macro in the code.
If you want the code to work for another cell or more cells you can change the range in the event.
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Cells.Count > 1 Then Exit Sub
    If Not Application.Intersect(Range("A1"), Target) Is Nothing Then
        If IsNumeric(Target.Value) And Target.Value > 0 Then
            'Call YourMacroName
        End If
    End If
End Sub
For sending mail from outlook

macro to create/display a Outlook mail with a small text message.
You must copy this macro in a standard module and not in the worksheet module, use .Display in the code to display the mail, you can change that to .Send

Do not forget to change Call YourMacroName to Call Mail_small_Text_Outlook in the Change event

Sub Mail_small_Text_Outlook()
'Working in Office 2000-2010
    Dim OutApp As Object
    Dim OutMail As Object
    Dim strbody As String

    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    strbody = "Hi there" & vbNewLine & vbNewLine & _
        "Cell A1 is changed" & vbNewLine & _
        "This is line 2" & vbNewLine & _
        "This is line 3" & vbNewLine & _
        "This is line 4"

    On Error Resume Next
    With OutMail
      .To = "ron@debruin.nl"
      .CC = ""
      .BCC = ""
      .Subject = "This is the Subject line"
      .Body = strbody
      'You can add a file like this
      '.Attachments.Add ("C:\test.txt")
      .Display   'or use .Send
    End With
    On Error GoTo 0

    Set OutMail = Nothing
    Set OutApp = Nothing
End Sub

  Anoop S replied to Melanie
17-Aug-11 12:33 AM
sorry small mistake, change
If IsNumeric(Target.Value) And Target.Value > 0 Then
            'Call YourMacroName
        End If
to

If IsNumeric(Target.Value) And Target.Value < 0 Then
'Call YourMacroName End If
  Radhika roy replied to Melanie
17-Aug-11 09:48 AM

 

 Try this function-

Sub checkdate()

Dim myRange As String
Dim Ws As Worksheet
Dim oRow As Long 'row number on BatchSheet
Dim Mailsubj1 As String
Dim Mailsubj2 As String

Set Ws = ThisWorkbook.Worksheets("RePrintSchedule")
oRow = Ws.UsedRange.Rows.Count + 1

'

For i = 2 To oRow

If Range("D" & (i)).Value = Range("H1").Value Then

Mailsubj1 = Range("A" & (i)).Value
Mailsubj2 = Range("B" & (i)).Value

'MsgBox Mailsubj2 & ": " & Mailsubj1 & " //eom"

Application.Run "SendNotesMail"
End If
Next

End Sub

Sub SendNotesMail()
Dim Maildb As Object, UserName As String, MailDbName As String
Dim MailDoc As Object, Session As Object
Dim myArr As Variant, i As Long

Set Session = CreateObject("Notes.NotesSession")
UserName = Session.UserName
MailDbName = Left$(UserName, 1) & Right$(UserName, _
(Len(UserName) - InStr(1, UserName, " "))) & ".nsf"
Set Maildb = Session.GetDatabase("", MailDbName)
If Maildb.IsOpen = True Then
Else: Maildb.OpenMail
End If
Set MailDoc = Maildb.CreateDocument
MailDoc.Form = "Memo"
MailDoc.SendTo = "emailname@somewhere.com" 'Nickname or full address
'MailDoc.CopyTo = Whomever
'MailDoc.BlindCopyTo = Whomever

MsgBox Mailsubj2 & ": " & Mailsubj1 & " //eom"

MailDoc.Subject = Mailsubj2 & ": " & Mailsubj1
'myArr = Range([a2], [a65536].End(3))
'For i = LBound(myArr) To UBound(myArr)
'myArr(i) = Right(myArr(i), Len(myArr(i)) - 1)
'Next
MailDoc.Body = "Put mail message body here ....."
'Replace("As a result of a review of your AWP collections that" & _
' "I have carried out,@@I have asked Leisure Link to replace your ????? " & _
' "AWP.@@@@I or your Leisure Link Business Account Manager will try" & _
' "@@to phone you to discuss this within the next couple of days." & _
' "@@However if you have any immediate comments,@@please do not " & _
' "hesitate to contact either of us." & _
' Join(Application.Transpose(myArr), "@") & _
' "@@With kind regards", "@", vbCrLf)
MailDoc.SaveMessageOnSend = True
MailDoc.PostedDate = Now
On Error GoTo Audi
Call MailDoc.Send(False)
Set Maildb = Nothing: Set MailDoc = Nothing: Set Session = Nothing
Exit Sub
Audi:
Set Maildb = Nothing: Set MailDoc = Nothing: Set Session = Nothing
End Sub


Hope this will help you.

  Pichart Y. replied to Melanie
19-Aug-11 01:31 AM

Hi Melanie,
I design for you like this...
1) you have the list of company/person with due date in worksheet. Here I put it in sheet 1 column A and B
2) you need to change the macro name to be "Sub Auto_open()"
3) goto control panel, set schedule task > browse this file > set perform task frequency (tick Daily) > set the time you prefer....etc. the wizard will guide you through...

Then everyday at you set time, the file will be openned, the code will auto run to check the due date compare to system date, if it find any date = system date, then it will get the company name and send mail to you..
**Important**
  1) Before use mail as automated, you need to change the sub to be "Sub Auto_open()"
  2) change the information in code as yours.
  3)this mail sending is design for Outlook 2003...the process is...
  

Here attachment ---------> DueDateChk&MailSend.zip

**please try it, I haven't try it yet and appreciate you result feedback.**

Pichart Y.
---------------------- Code start --------------------------

Sub SendEmail_Outlook()

    Dim OutlookApp As Object
    Dim MItem As Object
    Dim email As String
    Dim subject As String
    Dim salutation As String
    Dim recipient As String
    Dim body As String
    Dim remark As String
    Dim ending As String
    Dim sender As String
    Dim telNo As String

  
   'Create  Outlook object
    Set OutlookApp = CreateObject("Outlook.Application")
   
' Loop through the rows
For i = 2 To Range("A" & Rows.Count).End(xlUp).Row
If Range("B" & i).Value = Date Then
dueComp = Range("B" & i).Offset(0, -1).Value

      email = "YourEmailAddress@gmail.com"
      subject = "Mail Alert: Over Due Supplier"
      salutation = "Hi Myself"
      recipient = "Dear Myself,"
      remark = "If any remark"
      ending = "Best Regards,"
      sender = "I, myself"
      telNo = "XXX-XXX-XXXX"
      'attach = ThisWorkbook.Path & "\" & ActiveCell.Offset(0, 9).Value
      body = salutation & " " & recipient & Chr(13) & Chr(13) & _
      "Please notified that today is the Due Date of the supplier " & dueComp & Chr(13) & remark & Chr(13) & Chr(13) & ending & Chr(13) & sender & Chr(13) & telNo
       
     'Create Mail Item and send it
      Set MItem = OutlookApp.CreateItem(0)
      With MItem
        .To = email
        .subject = subject
        .body = body
       '.attachments.Add attach
        .send
      End With
End If
Next i
Set MItem = Nothing
  Set OutlookApp = Nothing
End Sub

--------------------------End Code ------------------------------

 

  Pichart Y. replied to Melanie
19-Aug-11 01:32 AM

Hi Melanie,
I design for you like this...
1) you have the list of company/person with due date in worksheet. Here I put it in sheet 1 column A and B
2) you need to change the macro name to be "Sub Auto_open()"
3) goto control panel, set schedule task > browse this file > set perform task frequency (tick Daily) > set the time you prefer....etc. the wizard will guide you through...

Then everyday at you set time, the file will be openned, the code will auto run to check the due date compare to system date, if it find any date = system date, then it will get the company name and send mail to you..
**Important**
  1) Before use mail as automated, you need to change the sub to be "Sub Auto_open()"
  2) change the information in code as yours.
  3)this mail sending is design for Outlook 2003...the process is...
  

Here attachment ---------> DueDateChk&MailSend.zip

**please try it, I haven't try it yet and appreciate you result feedback.**

Pichart Y.
---------------------- Code start --------------------------

Sub SendEmail_Outlook()

    Dim OutlookApp As Object
    Dim MItem As Object
    Dim email As String
    Dim subject As String
    Dim salutation As String
    Dim recipient As String
    Dim body As String
    Dim remark As String
    Dim ending As String
    Dim sender As String
    Dim telNo As String

  
   'Create  Outlook object
    Set OutlookApp = CreateObject("Outlook.Application")
   
' Loop through the rows
For i = 2 To Range("A" & Rows.Count).End(xlUp).Row
If Range("B" & i).Value = Date Then
dueComp = Range("B" & i).Offset(0, -1).Value

      email = "YourEmailAddress@gmail.com"
      subject = "Mail Alert: Over Due Supplier"
      salutation = "Hi Myself"
      recipient = "Dear Myself,"
      remark = "If any remark"
      ending = "Best Regards,"
      sender = "I, myself"
      telNo = "XXX-XXX-XXXX"
      'attach = ThisWorkbook.Path & "\" & ActiveCell.Offset(0, 9).Value
      body = salutation & " " & recipient & Chr(13) & Chr(13) & _
      "Please notified that today is the Due Date of the supplier " & dueComp & Chr(13) & remark & Chr(13) & Chr(13) & ending & Chr(13) & sender & Chr(13) & telNo
       
     'Create Mail Item and send it
      Set MItem = OutlookApp.CreateItem(0)
      With MItem
        .To = email
        .subject = subject
        .body = body
       '.attachments.Add attach
        .send
      End With
End If
Next i
Set MItem = Nothing
  Set OutlookApp = Nothing
End Sub

--------------------------End Code ------------------------------

 

Create New Account
help
Microsoft Excel Excel I am quite impatient and would like to watch a tutorial on excel that takes one through the basics to advanced spreadsheet management. soes such a thing exist? - - ken Excel New Users Discussions Microsoft Excel (1) Excel 2007 (1) Excel 2003 (1) Charts (1) Office (1) Union (1) Page (1
Advanced Excel (Group, Books, etc) Excel Hi, I consider myself to be very proficient in excel - and am looking to educate myself on "very advanced" excel topics / features. Does anyone have a good resource that can help me with this? A book, a group? Thanks Excel Miscellaneous Discussions Microsoft Excel (1) Excel (1) VBA (1) ExcelVBA (1) PTAnalysis (1) Walkenback (1) D81d7c77c8d4 (1) C7dd93a8
Filter in Microsoft Excel Excel Hi all, I am using microsoft excel 2000. I need help in filtering the data. I have two columns as below Name follows. b How we will define this filter. Please help me. . . . Thanx for reading. Robin Excel Worksheet Discussions Microsoft Excel (1) SUMPRODUCT (1) COUNTIF (1) OFFSET (1) COLUMN (1) VBA (1) À´ªàµà´¤àµ
Does anyone have a template for creating a slip chart in Excel Excel Excel Charting Discussions Microsoft Excel (1) Series (1) Chart (1) Excel (1) ChartsHowTo (1) Accidents (1) Crosses (1) Plots (1) Hi, Can you provide a link to an example of what you mean by 'Slip Chart'? Cheers Andy - - Andy Pope, Microsoft MVP - Excel http: / / www.andypope.info I assume he means this: http: / / www.noweco.com / qei / qeie10
Microsoft Works and Excel Excel My Excel spreadsheets have to open in Microsoft Works rather than Excel. Is there some way to fix it so that when I click to open an Excell spreadsheet, it opens with Excel? Thanks. Excel Miscellaneous Discussions Microsoft Excel (1) Excel 2007 (1) Workbooks (1) Office (1) Excel (1) Windows