Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to set the default start date as today when creating new task in Outlook?

When we create a new task in Outlook, the task with “Start Date” is displayed with “None” by default as following screenshot shown. But, sometimes, you need to set today as its Start date frequently, so, you have to select the date in “Start date” field manually each time. Is there any quick way to set the default start date as today automatically when creating a new task in Outlook?

Set the default start date as today when creating a new task with VBA code in Outlook


Set the default start date as today when creating a new task with VBA code in Outlook

May be there is no other good way to deal with this task in Outlook directly, here, I will introduce a VBA code to solve it. Please do with following steps:

1. Launch the Outlook, and then hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. In the Microsoft Visual Basic for Applications window, double click ThisOutlookSession from the Project1(VbaProject.OTM) pane to open the mode, and then copy and paste the following code into the blank module.

VBA code: Set default start date as today:

Public WithEvents xInspectors As Outlook.Inspectors
Public WithEvents xTaskItem As Outlook.TaskItem
Private Sub Application_Startup()
   Set xInspectors = Outlook.Inspectors
End Sub
Private Sub xInspectors_NewInspector(ByVal Inspector As Inspector)
    If Not (TypeOf Inspector.CurrentItem Is TaskItem) Then Exit Sub
    Set xTaskItem = Inspector.CurrentItem
End Sub
Private Sub xTaskItem_Open(Cancel As Boolean)
If (Len(xTaskItem.Subject) = 0 And Len(xTaskItem.Body) = 0) And (xTaskItem.StartDate = #1/1/4501# And xTaskItem.DueDate = #1/1/4501#) Then
    xTaskItem.StartDate = Now
End If
End Sub

3. After inserting the code, then put the cursor at the second code section, and press F5 key to run this code, see screenshot:

4. Since then, when you create a new task each time, Outlook will auto set the start date and end date to the current date by default as following screenshot shown:


Kutools for Outlook - Brings 100 Advanced Features to Outlook, and Make Work Much Easier!

  • Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by custom; Auto Reply without exchange server, and more automatic features...
  • BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
  • Reply (All) With All Attachments in the mail conversation; Reply Many Emails in seconds; Auto Add Greeting when reply; Add Date into subject...
  • Attachment Tools: Manage All Attachments in All Mails, Auto Detach, Compress All, Rename All, Save All... Quick Report, Count Selected Mails...
  • Powerful Junk Emails by custom; Remove Duplicate Mails and Contacts... Enable you to do smarter, faster and better in Outlook.
shot kutools outlook kutools tab 1180x121
shot kutools outlook kutools plus tab 1180x121
 
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.