Outlook Solutions Archive

When printing tables of Outlook emails, you may prefer to print each table in separate pages so as to leave enough empty space for adding lots of notes beside each table later. At present, this article will tell you how to get it intelligently.  

From my previous article “2 Methods to Quickly Print All Tables in Your Outlook Email“, you can get a way to print out tables only in an email. That means would print the tables continuously in one page. In this situation, if later you add a lot of annotations beside the tables, this page will look a bit crowded. Hence, perhaps you will wish to print the tables in separate pages. Now, in the followings, we will share you a smart and effective way to achieve it.Batch Print All Tables of Multiple Outlook Emails

Batch Print All Tables of Multiple Emails

  1. At the very beginning, start Outlook application.
  2. Then, access Outlook VBA editor via “Alt + F11”.
  3. Next, paste the VBA code below into a module.
Sub BatchPrintAllTablesOfMultipleEmailsOnSeparatePages()
    Dim objSelection As Outlook.Selection
    Dim i As Long
    Dim objMail As Outlook.MailItem
    Dim objMailDocument As Object
    Dim objWordApp As Object
    Dim objTable As Object
    Dim objTempDocument As Object
 
    'Get all selected emails
    Set objSelection = Outlook.Application.ActiveExplorer.Selection
 
    If Not (objSelection Is Nothing) Then
       For i = objSelection.Count To 1 Step -1
           If objSelection(i).Class = olMail Then
              Set objMail = objSelection(i)
              Set objMailDocument = objMail.GetInspector.WordEditor
 
              On Error Resume Next
              Set objWordApp = GetObject(, "Word.Application")
              If objWordApp Is Nothing Then
                 Set objWordApp = CreateObject("Word.Application")
              End If
              objWordApp.Visible = True
 
              For Each objTable In objMailDocument.Tables
                  objTable.Range.Copy
 
                  'Print tables in separate pages
                  Set objTempDocument = objWordApp.Documents.Add
                  objTempDocument.Content.Paste
                  objTempDocument.PrintOut
                  objTempDocument.Close False
              Next
          End If
      Next
 
      objWordApp.Quit
    End If
End Sub

VBA Code - Batch Print All Tables of Multiple Emails

  1. After that, add this macro to Quick Access Toolbar according to “How to Run VBA Code in Your Outlook“.
  2. Finally, you can try it.
  • At first, select several emails whose tables you want to print.
  • Subsequently, click the macro button in Quick Access Toolbar.Run Macro on Selected Mails
  • When macro finishes, all the tables of these emails will be printed out in separate pages.Printed Tables

Fire Back Against All Risks around Outlook

Outlook is unable to escape from errors, crash and so on. Therefore, maybe you have met up with some errors or even severe Outlook corruption. Generally, you can firstly try the inbuilt fix utility for Outlook fix. When it fails, you can continue to resort to a more experienced external tool, like DataNumen Outlook Repair. It’s capable of solving majority of Outlook problems with ease.

Author Introduction:

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

Be the first to comment

At times, you may hope to remove all email addresses with a specific domain from your contacts. In this situation, you must be unwilling to do that one by one. Thus, this post will teach you a far smarter method.

For instance, a company changes its name. Meanwhile, the company domain also gets altered. However, in Outlook, you have stored many contacts in this company, whose email addresses are with the old domain. Of course, these email addresses are no longer valid. Hence, under this circumstance, if you would like to remove these email addresses in one go, you can use the following way.Batch Remove All Email Addresses with a Specific Domain from Your Outlook Contacts

Batch Remove All Email Addresses with a Specific Domain from Contacts

  1. For a start, access Outlook VBA editor by key shortcut – “Alt + F11”.
  2. Then, in the new window, place the following VBA code in an empty module.
Dim strDomain As String

Sub BatchRemoveAllEmailAddressesInSpecificDomain()
    Dim objStore As Store
    Dim objFolder As Folder
    Dim lTotalCount As Long
 
    'Input the specific domain
    strDomain = InputBox("Enter the specific domain:", , "@false.com")
 
    If Len(strDomain) <> 0 Then
       lTotalCount = 0
       'Process all Contact folders in your Outlook
       For Each objStore In Application.Session.Stores
           For Each objFolder In objStore.GetRootFolder.Folders
               If objFolder.DefaultItemType = olContactItem Then
                  Call ProcessContactFolders(objFolder, lTotalCount)
               End If
           Next
       Next
 
       'Prompt you
       MsgBox lTotalCount & " email addresses in " & strDomain & " are removed!", vbInformation + vbOKOnly
    End If
End Sub

Sub ProcessContactFolders(ByVal objCurrentFolder As Folder, ByRef lCount As Long)
    Dim objContacts As Items
    Dim i As Long
    Dim objContact As ContactItem
 
    Set objContacts = objCurrentFolder.Items
 
    For i = objContacts.Count To 1 Step -1
        If TypeName(objContacts(i)) = "ContactItem" Then
           Set objContact = objContacts(i)
 
           'Check 3 email addresses of each contact
           If InStr(objContact.Email1Address, strDomain) > 0 Then
              lCount = lCount + 1
              objContact.Email1Address = ""
              objContact.Email1DisplayName = ""
           ElseIf InStr(objContact.Email2Address, strDomain) > 0 Then
              lCount = lCount + 1
              objContact.Email2Address = ""
              objContact.Email2DisplayName = ""
           ElseIf InStr(objContact.Email3Address, strDomain) > 0 Then
              lCount = lCount + 1
              objContact.Email3Address = ""
              objContact.Email3DisplayName = ""
           End If
 
           objContact.Save
        End If
     Next
 
     If objCurrentFolder.Folders.Count > 0 Then
        For Each objSubfolder In objCurrentFolder.Folders
            Call ProcessContactFolders(objSubfolder, lCount)
        Next
     End If
End Sub

VBA Code -Batch Remove All Email Addresses with a Specific Domain from Contacts

  1. After that, put cursor in “BatchRemoveAllEmailAddressesInSpecificDomain” subroutine.
  2. Finally, click “F5” key button to trigger this macro.
  3. Subsequently, enter the specific domain the popup dialog box.Enter Domain
  4. After click “OK”, macro will run.
  5. When it finishes, you will get a message about the results.Prompt about Results
  6. Now, you can check the contacts. All the email addresses with the specific domain must have disappeared.Removed Email Addresses

Preserve Your Outlook File

With more and more risks surrounding your Outlook, it is increasingly difficult to safeguard your valuable Outlook data. For instance, not only should you persist in regular data backups, but also you have to watch out for your operations. It is not wise to readily trust in any emails from unknown senders. Otherwise, if it carries virus, your Outlook file will be infected. At that time, you have to attempt Outlook repair via a remarkable fix tool, such as DataNumen Outlook Repair.

Author Introduction:

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

Be the first to comment

After inserting several images into your Outlook email, if you want to center them in bulk, you can read this article. Here we will teach you 3 ways to get it.

Are you accustomed to placing the inserted images in center when composing email? Many users prefer such a layout in email. However, generally, it demands users to center align the images manually. Without any doubt, that is too tedious, so isn’t a smart way. Therefore, in the followings, we will introduce 3 much more effective means.Batch Center All Images Embedded in Your Outlook Email

Method 1: Batch Center All Images via “Find & Replace”

  1. At first, in the opened email window, press “Ctrl + H” key buttons.
  2. In the popup “Find and Replace” dialog box, on “Replace” tab, type “^g” in the “Find what” field.
  3. Then, click in the “Replace with” field and press “Ctrl +E”.Find and Replace
  4. After that, click the “Replace All” button.
  5. Immediately, all the embedded images will be centered, like the screenshot below.Centered Images

Method 2: Batch Center All Images with VBA

  1. In the first place, press “Alt + F11” to access VBA editor.
  2. Then, enable “Word Object Library” according to the article – “How to Add an Object Library Reference in VBA“.
  3. Next, put the following VBA code into a module.
Sub BatchCenterAllImagesEmbeddedInEmail()
    Dim objMail As Outlook.MailItem
    Dim objMailDocument As Word.Document
    Dim objDocSelection As Word.Selection
 
    Set objMail = ActiveInspector.CurrentItem
    Set objMailDocument = objMail.GetInspector.WordEditor
    Set objDocSelection = objMailDocument.Application.Selection

    With objDocSelection.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .Replacement.ParagraphFormat.Alignment = wdAlignParagraphCenter
        .Text = "^g"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = True
        .Execute Replace:=wdReplaceAll
    End With
End Sub

VBA Code - Batch Center All Images

  1. After that, add this macro to Quick Access Toolbar of Message window with reference to “How to Run VBA Code in Your Outlook“.
  2. Later, access the email and click the macro button in Quick Access Toolbar.
  3. At once, all images are moved to center.Run Macro to Batch Center All Images

Method 3: Auto Center All Images when Sending the Email via VBA

  1. In Outlook VBA editor, put the VBA code below into the “ThisOutlookSession” project.
'Auto center all pictures embedded in this email
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim objMail As Outlook.MailItem
    Dim objMailDocument As Word.Document
    Dim objInlineShape As Word.InlineShape
    Dim objDocSelection As Word.Selection
 
    If TypeName(Item) = "MailItem" Then
       Set objMail = Item
    End If
 
    If Not (objMail Is Nothing) Then
       Set objMailDocument = objMail.GetInspector.WordEditor

       For Each objInlineShape In objMailDocument.InlineShapes
           objInlineShape.Select
           Set objDocSelection = objMailDocument.Application.Selection
           objDocSelection.ParagraphFormat.Alignment = wdAlignParagraphCenter
       Next
    End If
End Sub

VBA Code - Auto Center All Images when Sending the Email

  1. After that, send the email directly. Outlook will auto center them on send.Auto Centered Images on Send

Avoid Outlook Data Corruption

Occasional errors or crashes have harassed a great amount of Outlook users. At best, the inbuilt tool can fix the issues with effortless ease. However, at times, the problems have drastically exceeds what the internal utility can do. At this point, it is necessary to employ a more powerful and specialized tool, such as DataNumen Outlook Repair. It can help you repair Outlook without breaking a sweat.

Author Introduction:

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

Be the first to comment