How to Default Cursor to “Subject” Field when Creating New Message in Outlook

In Outlook, when you create a new email, the new Message window will open with cursor located in “To” field by default. Yet, if you would like to position the cursor to the other field, such as “Subject”, you can use the method shared in this article.

As you can see, when you create a new email, the new Message window will open and the cursor is positioned in “To” field. However, some users would like to first fill in the email subject. Thus, they hope to put the cursor in “Subject” field. Here, we will introduce you a means which can change the default position of cursor in a new Message window.

Default Cursor to "Subject" Field when Creating New Message in Outlook

Default Cursor to “Subject” Field when Creating New Message

  1. At the very outset, start your Outlook program.
  2. Then, in the main Outlook window, you need to press “Alt + F11” key buttons.
  3. Subsequently, a “Microsoft Visual Basic for Applications” window will open.
  4. After that, you ought to open the “ThisOutlookSession” project.
  5. Next, you’d be required to copy the following VBA code into this project.
Public WithEvents objInspectors As Outlook.Inspectors
Public WithEvents objMail As Outlook.MailItem

Private Sub Application_Startup()
    Set objInspectors = Outlook.Application.Inspectors
End Sub

Private Sub objInspectors_NewInspector(ByVal Inspector As Inspector)
    If TypeOf Inspector.currentItem Is MailItem Then
       Set objMail = Inspector.currentItem
    End If
End Sub

'Occurs when opening an email
Private Sub objMail_Open(Cancel As Boolean)
    Dim objPages As Outlook.Pages
    Dim objPage As Object
    Dim objControl As Object
 
    'If it is a brand new mail
    If objMail.Subject = "" Then
       Set objPages = objMail.GetInspector.ModifiedFormPages
       'Get the Message window
       Set objPage = objPages.Add("Message")
       'Position the cursor in "Subject" field
       Set objControl = objPage.Controls("Subject")
       objControl.SetFocus
    End If
End Sub

VBA Code - Default Cursor to "Subject" Field when Creating New Message

  1. Then, you ought to sign this macro. Click on “Tools” in menu bar and select “Digital Signature”. In the new dialog box, just follow onscreen wizard.
  2. Later, you should continue modifying your Outlook macro settings to permit the signed macros.
  3. Finally, you can restart your Outlook application, which will activate the new VBA project.
  4. From now on, every time you create a new email, the new Message window will open with the cursor in “Subject” field, like the following screenshot:Default Cursor to "Subject" Field

Solutions to Outlook Corruption

Despite boasting of many capabilities, Outlook is still unable to get immune from errors and corruption. There is no doubt that the worst scenario is Outlook being damaged. At that point, if you have backed up PST files, you can restore data from the backed up file. But if you have no backups, you have no alternative to take aid of a reliable Outlook fix tool, like DataNumen Outlook Repair. It can mitigate the damage and retrieve maximum Outlook data for you.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including corrupted mdf and outlook repair software products. For more information visit www.datanumen.com

Comments are closed.