How to Quickly Send the Specific Pages of a Word Document as an Outlook Email

Some users long for a solution that allows them to send the specific pages of a Word document as an Outlook email in quick time. In this article, we will introduce such a method in detail.

If you have read my previous article “How to Quickly Attach the Specific Pages of a Word Document to an Outlook Email“, you may tend to ask for a method which can directly send the specific pages of a Word document as an email, rather than as an email attachment. Now, in the followings, we will show you a piece of VBA code, which can realize it with ease.

Send the Specific Pages of a Word Document as an Outlook Email

Send the Specific Pages of a Word Document as an Outlook Email

  1. To begin with, you need to access the source Word document whose specific pages you want to send.
  2. Then, in the opened Word window, you should press “Alt + F11” buttons.
  3. It will bring out the “Microsoft Visual Basic for Applications” window.
  4. In this window, you should insert a new module.
  5. Next, you have to enable “Microsoft Outlook Object Library”.
  • Click “Tools” and choose “Reference” from drop down list.
  • In the popup dialog box, scroll down until you see the “Microsoft Outlook Object Library”. Enable it and click “OK”.Enable “Microsoft Outlook Object Library”
  1. After that, you can copy the piece of VBA code below into this module.
Sub SendSpecificPagesAsOutlookEmail()
    Dim objSelectedPages As Word.Range
    Dim objOutlookApp As Outlook.Application
    Dim objMail As Outlook.MailItem
    Dim objMailDocument As Word.Document
 
    'Copy the contents from Page 3 to 4
    'Change the page number as per your needs
    Selection.GoTo What:=wdGoToPage, Which:=wdGoToAbsolute, Count:=3
    Set objSelectedPages = Selection.Range
    Selection.GoTo What:=wdGoToPage, Which:=wdGoToAbsolute, Count:=4
    objSelectedPages.End = Selection.Bookmarks("\Page").Range.End
    objSelectedPages.Select
    objSelectedPages.Copy
 
    'Get Outlook Application
    On Error Resume Next
    Set objOutlookApp = GetObject(, "Outlook.Application")
    If objOutlookApp Is Nothing Then
       Set objOutlookApp = CreateObject("Outlook.Application")
    End If
 
    'Create a new email
    Set objMail = objOutlookApp.CreateItem(olMailItem)
    objMail.Display
 
    'Paste the contents in specific pages into message body
    Set objMailDocument = objMail.GetInspector.WordEditor
    Set objTempRange = objMailDocument.Range(0, 0)
    objTempRange.PasteAndFormat (wdFormatOriginalFormatting)
End Sub

VBA Code - Send the Specific Pages of a Word Document as an Outlook Email

  1. Eventually, you can run this macro at once. Just press “F5” key button in the current module.
  2. You may receive an Outlook warning like the following screenshot. You could click “Allow” directly.Warning
  3. Ultimately, you will get an email which is containing the specific pages of the Word document.Email Containing Specific Pages of the Word Document

Pay Attention to Outlook Data Protection

You may be considerably satisfied with quantities of functions in Outlook. But, it still contains flaws. For instance, it is susceptible to errors and corruption. In this case, you have to pay much attention to Outlook protection, including backing up your Outlook PST files at regular interval. Besides, it’s prudent and suggested to keep a mighty PST repair utility, like DataNumen Outlook Repair. It is so powerful that it can extract maximum data from seriously corrupted Outlook file.

Author Introduction:

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

Comments are closed.