How to Only Keep the Selected Texts in Your Reply Email via Outlook VBA

By default, Outlook doesn’t support users to only keep the selected texts in the reply email. This article will introduce you a quick method to achieve it with Outlook VBA.

Sometimes, for some reasons, you may desire to only keep the selected texts in your reply email rather than the whole original email body. However, by default, Outlook comes without this native feature. In this case, as a rule, if you want to reply only the selected text, you can use a workaround. Firstly select the text and copy it by press “Ctrl + C” key buttons. Then click “Reply” button to open the reply email. Next select all the original email body in the reply and press “Ctrl + V” buttons to paste the selected text, which will totally cover the original email. Undoubtedly, it is quite tedious. Actually there is another approach, which can help you realize it in quick time. It will make use of Outlook VBA. Read on to get the concrete codes and the elaborate steps.

Only Keep the Selected Texts in Your Reply Email

  1. For a start, you can start Outlook as usual and switch to “Developer” tab.
  2. Then locate and click on “Visual Basic” button.
  3. In the subsequent window, you ought to open a new module and then copy and paste the following VBA codes into it.
Sub ReplySelection()
    Dim olItem As Outlook.MailItem
    Dim olReply As Outlook.MailItem
    Dim olInspector As Outlook.Inspector
    Dim objWDoc As Word.Document
    Dim objWSel As Word.Selection
    Set olItem = Outlook.Application.ActiveInspector.CurrentItem
    If Not olItem Is Nothing And olItem.Class = olMail Then
       Set olInspector = olItem.GetInspector
       If olInspector.EditorType = olEditorWord Then
          Set objWDoc = olInspector.WordEditor
          Set objWSel = objWDoc.Application.Selection
          Set olReply = olItem.Reply
          With olReply
               .HTMLBody = "<HTML><BODY> -----Selection in Original Message----- </BODY></HTML>" & objWSel.Text
          End With
       End If
    End If
End Sub

VBA Codes - Only Keep the Selected Texts in Your Reply Email

  1. Next you should click on “Tools” button in the toolbar and select “References” from the drop down list.References
  2. After that, in the popup dialog box, you ought to find out the “Microsoft Word Object Library” and activate it and lastly click “OK”.Enable Microosft Word Object Library
  3. Subsequently, you can exit the current VBA Editor window
  4. Later you can open the source email and hit the down arrow in Quick Access Toolbar and select “More Commands” from the drop down list.
  5. Then in the latter window, add the new macro to the Quick Access Toolbar.Add the VBA Macro to the Quick Access Toolbar in Message Window
  6. Finally you can select your desired texts in the current mail and then click on the new macro button in the Quick Access Toolbar. A reply email will pop up, which must only contain the selected texts, like the following screenshot:Only Keep the Selected Texts in Your Reply Email

What to Do in Face of Outlook Corruption

Although Outlook comes endowed with multiple functions, it still cannot totally escape from corruption, no matter for the application itself but also the Outlook file. Therefore, you’d better keep a potent Outlook problem repair tool in vicinity, like DataNumen Outlook Repair. It is able to get back you corrupt PST data with effortless ease.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including repair corrupt SQL database and outlook repair software products. For more information visit

Comments are closed.