How to Autofill Subject Line in Outlook?

The subject line of an email, reveals the title of your email to the recipient, many often users want to set up an attachment name as the email subject in Outlook.

How to prevent typing the same text repeatedly? The role of autofill the subject lines for new email messages comes into play.

In this article, you can learn related issues and methods to execute the autofill in the Outlook subject line.

Outlook quick steps subject one of the options allow the user to automatically fill the subject line with the specific content prescribed by the user.

Here is the step by step guide

  • Open Outlook >> Click Home Tab
  • Click the Create New in the Quick Steps box on the ‘Quick steps’ junction.

outlook quick steps subject

Edit quick steps popup appears. Initially name your quickstep and enter the name in the name section, secondly Choose an Action box, and select the New Message in the Respond section from the drop-down list.

outlook subject line

In the same dialog box ‘Edit Quick Steps’, click to Show Options just below the To box.

Enter your subject in the Subject Box, you can flag your message and set the important criteria, there is short key also available according to your choice and Finally, Click Finish.

quick steps

Above step customize the quickstep button for the New mail message. You can check out the Quickstep junction in the Home tab, your quickstep button grab the position which was not their earlier.

changing subject line in email

Click To Mail Smartly button and you would be redirected to the new mail message tab and the subject line is already filled with the subject.

Auto-populate Date in outlook subject line

Adding the current date or current time in the subject line seems professional and also smart working to keep the record which can be searched in the future very easily.

To do so here is the step by step tutorial ~

The majority of Outlook users enter the date, time, or both manually in the subject line, which is hectic to enter every time.

Auto insert todays date in outlook subject line brings professional & perfection in your work.

  • Step 1 – Open Outlook >> Home Tab >> New Mail >> Developer >> Click Developer Tab

insert todays date in outlook

  • Step 2 – This step walks you through another page with multiple options, in this scenario click right to the Subject box, and select the properties.

auto populate date

  • Step 3 – Properties dialog box pops up, click to value tab, find Initial value, type Date() click the OK button, If you like to mention the time you need to type Now() in the Edit box, that will automatically enter the current time into your subject line.

outlook create email

  • Step 4 – The next step is to save the page, Click the Publish >> Publish form as on the developer tab.

Publish form as on the developer tab

  • Step 5 – Enter the name of the file in the display name and click publish.

Auto-populate Date in outlook

That’s the end of part I, you have created the customized message board which allows you to insert current date or time on creating a new message.

Its time to learn how to insert today’s date in outlook subject line

  • Click Choose Form button on the Developer tab of the main outlook main screen, no need to open new mail this time.

outlook timestamp

  • Click to ‘Look in’ box, and select the Personal Forms Library.
  • You can find your saved form which you have created in part I.
  • Select and click open.

publisher date

  • After clicking open, the new mail dialog box appears and you can check a new tab created with the same name you have given to the form, and the subject line is automatically filled with the current date.

autofill subject line in outlook

Autofill subject line using VBA

VBA coding is the programming you can easily manually insert in your outlook which can work for you in many different tasks, here you can simply copy and paste the given codes into outlook to autofill subject line.

Here is the step by step tutorial “How to insert VBA in Outlook?

  • Open Outlook >> Click Alt F11 >> Microsoft Visual Basic page appears. (It’s completely different and unfamiliar to the majority of users), but there is nothing to worry about.
  • The next step is to insert a module by clicking the Insert >> Module.
  • Copy (Ctrl + C and Paste Ctrl + V the below code)

Sub New_Secure_Email()
Dim MItem As MailItem
Set MItem = Application.CreateItem(olMailItem)
MItem.Subject = "your preset subject"
MItem.Display
End Sub

In the fourth line of VBA, you have to replace your present subject to the subject line you like to fix for your email.

Finally, you are ready to go, You can click the Run button on the toolbar or simply press the F5 key to run this VBA code.

Autofill Subject Line With VBA In Outlook

How to autofill email subject line with the attachment name in outlook?

Manually typing the attachment name in the email subject line is another hectic process, VBA is the only solution that automatically reads and imposed attachment name into subject line.

Steps are exact same to insert VBA Code into Outlook, all you have to (Copy Ctrl + C and Paste Ctrl + V the below code).


Public WithEvents olInspectors As Outlook.Inspectors
Public WithEvents olMail As Outlook.MailItem

Private Sub Initialize_handlers()
    Set olInspectors = Application.Inspectors
End Sub

Private Sub olInspectors_NewInspector(ByVal Inspector As Inspector)
    Dim olItem As Object
    Set olItem = Inspector.CurrentItem
    If TypeName(olItem) = "MailItem" Then Set olMail = olItem
End Sub

Private Sub olMail_AttachmentAdd(ByVal Attachment As Attachment)
    If olMail.Subject = "" Then
      'If you don't want the prompt,
      'Just delete the Msgbox line and its corresponding "End if".
      If MsgBox("Do you want to use the attachment name as the subject", vbYesNo) = vbYes Then
         olMail.Subject = Attachment.DisplayName
      End If
    End If
End Sub

Here is something new autofill subject line in Outlook, I personally enjoy working with this. After using it please comment below and share your experience.

Also Read:

Leave a Comment