Codes for "Mark Complete" the task

Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server 2010
#1
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
 
Outlook version
Outlook 2010 32 bit
Email Account
POP3
#2
Hi,

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

Code:
Item.MarkComplete
Hope this can help you.
 

Similar threads

Top