Results 1 to 10 of 28

Thread: Automatic sort due date and send email

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #14
    Junior Member
    Join Date
    Apr 2018
    Posts
    23
    Rep Power
    0
    Hi Alan,
    Please ignore the outlook email. I will work on that part by myself. Beside that everything on your code is working fine. I did try out your code and it did send a notification to my work email and our share email too. It is working good.

    So I believe we should move forward to removing the test date and adding subject and body message and hyperlink to the template. Please send me the new template through out share email. Thanks.

    Just one last concern, With your code. Does it check column G, I and K for due date?

    just an example of OUtlook code I used in the past.
    Dim OutApp As Object
    Dim OutMail As Object
    Dim fileName As String
    Dim mSubject As String
    Dim signature As String
    Dim fname As String
    Dim mBody As String
    Dim rng As Range
    Dim rng1 As Range
    Dim ws As Worksheet
    Dim mailTo As String
    fname = ws.Range("A1")
    mSubject = "Equipment" & " For " & Range("A1").Value
    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)
    'mBody = "Z:\2\Form\\Manufacturing Order.xlsm"

    Dim Path As String
    ws.Protect ("Equipment")
    Path = "\\Equipment- Maint RecordsThai1.xlsm"
    mBody = "<font size=""3"" face=""Calibri"">" & _
    "Dear Team,<br><br>" & _
    "Please open the file from below link and change the date on the respective cell after you completed your task.<br><B>" & _
    fileName & ".xlsm" & "</B> is created.<br>" & _
    "Click on this link to open the file : " & _
    "<A HREF=""file://" & Path & fileName & ".xlsm" & _
    """>Files are saved here</A>" & "-->" & Range("A1").Value & _
    "<br><br>Best Regards," & _
    "<br><br></font>"

    With OutMail
    .display
    End With
    signature = OutMail.body
    With Application
    .EnableEvents = False
    .ScreenUpdating = False
    End With
    Last edited by Thainguyen; 06-01-2018 at 07:34 PM.

Similar Threads

  1. Replies: 1
    Last Post: 06-28-2014, 11:31 AM
  2. Find the value of the due date falls between two dates
    By mahmoud-lee in forum Excel Help
    Replies: 2
    Last Post: 03-14-2014, 10:48 AM
  3. Replies: 4
    Last Post: 02-03-2014, 07:01 PM
  4. Replies: 1
    Last Post: 11-20-2013, 09:14 AM
  5. Replies: 2
    Last Post: 05-23-2013, 08:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •