+ Reply to Thread
Results 1 to 2 of 2

Pop up when sending email to flag for follow up

  1. #1
    Registered User
    Join Date
    08-20-2014
    Location
    Earth
    MS-Off Ver
    2010
    Posts
    1

    Pop up when sending email to flag for follow up

    Hello,

    I would like a macro that pops up a window asking if I want to flag a message for follow up each time I send a message. I want the flag on my end so I will automaticlly see it in my tasks lists and remember to follow up if I have not received an answer.

    Here is what I have.

    Option Explicit
    Private WithEvents olSentItems As Items
    Private Sub Application_Startup()
    Dim objNS As NameSpace
    Set objNS = Application.Session
    ' instantiate objects declared WithEvents Set olSentItems = objNS.GetDefaultFolder(olFolderSentMail).Items
    Set objNS = Nothing End Sub
    Private Sub olSentItems_ItemAdd(ByVal Item As Object)
    On Error Resume Next
    Dim prompt As String

    prompt$ = "Do you want to flag this message for followup?"
    If MsgBox(prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Add flag?") = vbYes Then

    With Item
    .MarkAsTask olMarkThisWeek
    ' sets a due date in 3 days
    .TaskDueDate = Now + 3
    .ReminderSet = True
    .ReminderTime = Now + 2
    .Save End With
    End If End Sub

    I get a sytax error at "Set objNS = Nothing End Sub"

    I am running office 2010.

    Thanks in advance.
    Attached Images Attached Images

  2. #2
    Forum Contributor
    Join Date
    08-27-2006
    Posts
    136

    Re: Pop up when sending email to flag for follow up

    The formatting is not quite right here as it is changed to fit the page.

    Flag messages after sending http://www.slipstick.com/developer/c...-up-using-vba/

    This is what the code should look like in the editor.

    Please Login or Register  to view this content.
    To mark "Solved" go to Thread Tools.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] sending email with specific range as email body vba modification
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-19-2014, 11:24 AM
  2. automation/macro for sending email to multiple email address
    By saurabhlotankar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-30-2013, 12:13 PM
  3. Sending HTML email via excel VBA - arriving as RTF email
    By Shuter1 in forum Outlook Programming / VBA / Macros
    Replies: 3
    Last Post: 06-21-2012, 04:35 AM
  4. Sending emails with Follow up
    By Sibrulotte in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 11-05-2010, 02:08 PM
  5. Sending Email Dependent on Default Email Client
    By Julesdude in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-30-2010, 06:51 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1