Codes for "Mark Complete" the task

Status
Not open for further replies.

suryakant02

New Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server 2010
Hello...

I have created a code for auto reminder recurring mail from outlook task but every time, the popup for the task come up and i have to mark complete the task to prevent the recurring. thus, can anybody help me in writing code for the auto "Mark Complete" the task.

my codes

Code:
Private Sub Application_Reminder(ByVal Item As Object)
    Dim objPeriodicalMail As MailItem
 
    If Item.Class = olTask Then
        If InStr(LCase(Item.Subject), "send an email periodically") Then
          Set objPeriodicalMail = Outlook.Application.CreateItem(olMailItem)
          With objPeriodicalMail
               .Subject = "Test"
               .To = "abc@def.com"
               .Body = "Dear Sir," & vbCrLf & "Please send the report by 1000hrs."
               '.Attachments.Add ("C:\Attachments\DataNumen.docx")
               .Importance = olImportanceHigh
               .ReadReceiptRequested = True
               .Send
          End With
        ElseIf InStr(LCase(Item.Subject), "send an email periodically1") Then
          Set objPeriodicalMail = Outlook.Application.CreateItem(olMailItem)
          'Change the following email information as per your actual needs
          With objPeriodicalMail
               .Subject = "Test"
               .To = "abc@def.com"
               .Body = "Dear Sir," & vbCrLf & "Please send the report by 1000hrs."
               '.Attachments.Add ("C:\Attachments\DataNumen.docx")
               .Importance = olImportanceHigh
               .ReadReceiptRequested = True
               .Send
          End With
        End If
    End If
End Sub
 

Amanda Barron

New Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
Hi,

you can simply add the following to auto mark the current task complete:

Code:
Item.MarkComplete

Hope this can help you.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
N Outlook Email Rule execution through shortcut keys (VBA codes) Using Outlook 1
M Update field codes when opening Outlook Template Outlook VBA and Custom Forms 2
L Outlook 2007 Codes Export and Import Using Outlook 9
T Setting Color codes for each user of a shared Calendar Using Outlook 1
A Updating Outlook Contact Phone Nos to international dialling codes Using Outlook 5
A Cannot Send/Receive - Error codes: 0x80041059, 0x8004102A, 0x8DE00005 Using Outlook 5
DoctorJellybean Outlook 365 doesn't always mark emails as read Using Outlook 3
O Office 365 Outlook - mark to download Using Outlook 0
S Mark as Unread unless Categorized by Color Using Outlook 0
Diane Poremsky Mark Sent Items as Read After Copying with a Rule New Slipstick.com Articles 0
M Mark Complete keyboard shortcut... on a mac running Windows Bootcamp Using Outlook 0
T Adding "Mark As Complete" btton to Task Remindet Pop-Up Using Outlook 3
F Automatically close email after selecting mark unread Using Outlook 1
T Outlook 2013 either fails to mark messages as read or marks them as read, then un-marks them. Using Outlook 1
Mary B VBscript: Need to copy every email to a folder & mark that copy as read Outlook VBA and Custom Forms 5
C Mark all incoming emails as read Outlook VBA and Custom Forms 3
M How do I mark emails already received as read when I get a second, different email based on subject? Outlook VBA and Custom Forms 3
T outlook 2013 does not mark multiple forward messages as forward Using Outlook 2
7 Macro to mark message as junk and delete Outlook VBA and Custom Forms 3
V Mark BCC when emails is sent from specific account Outlook VBA and Custom Forms 2
B Outlook 2010: how to mark messages without opening? Eg for deletion Using Outlook 2
Z Mark moved copies as "Read" Using Outlook 19
Z "Mark All as Read" in Outlook 2007 extremely slow Using Outlook 1
N Mark or follow up emails in shared mailbox Using Outlook 2
H mark as read per folder options Using Outlook 1
C Outlook 2010 search for question mark in calendar Using Outlook 7
M Can't mark appointments as private for other user Using Outlook 1
R Outlook 2010 Quick Steps - Mark as Read Action and New Mail Notification Using Outlook 1
A Mark all as read for public folders Using Outlook 14
I Pound Symbol in emails show as � (black diamond with white question mark inside) - Office 2010. Using Outlook 11
N Changing the 'Mark item as read when selection changes' at runtime Outlook VBA and Custom Forms 1
B Move Sent Email to archival pst folder and mark as read - HOW TO Outlook VBA and Custom Forms 2
B Mark copy of sent email as read - VBA? Outlook VBA and Custom Forms 3
A 'Mark Unread' button - bug in Outlook 2010 RTM Using Outlook 11
J Pasting into Outlook 2003 produces blue question mark Using Outlook 2
J Mark as read Outlook VBA and Custom Forms 2
M Mark as read Outlook VBA and Custom Forms 5
R Macro to mark item unread Outlook VBA and Custom Forms 2
T Setting a delegate to not mark items as read Using Outlook 9
C AdvancedSearch never Complete Outlook VBA and Custom Forms 0
J Edit auto-complete list in Outlook 2016+/365? Using Outlook 0
T Have Outlook 2016 suggest email address auto complete entries directly from the user's contacts list Using Outlook 10
T Have Outlook 2016 suggest email address auto complete entries directly from the user's contacts list Using Outlook 0
N Auto-complete - block select emails Using Outlook 3
Commodore Search cannot complete the indexing of your Outlook data Using Outlook 6
E Outlook 2010 disable date auto-complete Using Outlook 2
Diane Poremsky Could not complete the operation. One or more parameter values are not valid. New Slipstick.com Articles 0
K Outlook 2013 Recurring Tasks Not Showing Complete Outlook.com Using Outlook.com accounts in Outlook 1
P Is it possible to convert address book to "Auto-Complete List" (NK2)? Using Outlook 5
Christiaan Could not complete operation because the service provider does not support it Using Outlook 2

Similar threads

Top