If you would like to quickly print all tables without the other texts in an Outlook email, you can utilize either of the 2 approaches to accomplish it.
When you receive an email which contains many tables in the message body, at times, you may wish to extract these tables and print them out only, without the texts in the body. However, Outlook has no related functions to achieve it. Thus, in the followings, we will share you 2 means.
Method 1: Print All Tables in Separate Pages
- To start with, launch your Outlook program.
- Then in the main Outlook window, press “Alt + F11” key buttons.
- In the subsequent “Microsoft Visual Basic for Applications” window, you can find and open a module that is not in use.
- After that, you should copy the following VBA code into this module.
Sub PrintAllTables_inOutlookEmail_Individually() Dim objMail As Outlook.MailItem Dim objMailDocument As Word.Document Dim objTable As Word.Table Dim lTableCount As Long Dim objWordApp As Word.Application Dim objWordDocument As Word.Document Dim i As Long 'Get the Source Mail Set objMail = Outlook.Application.ActiveExplorer.Selection.Item(1) Set objMailDocument = objMail.GetInspector.WordEditor lTableCount = objMailDocument.Tables.count Set objWordApp = CreateObject("Word.Application") objWordApp.Visible = True For i = 1 To lTableCount Set objTable = objMailDocument.Tables(i) objTable.Range.Copy 'Copy Each Table into Each Word Document Set objWordDocument = objWordApp.Documents.Add objWordDocument.Content.Paste 'Print Out Each Document objWordDocument.PrintOut objWordDocument.Close False Next objWordApp.Quit End Sub
- Later you should add the new VBA project to Quick Access Toolbar. Head to “Outlook Options” > “Quick Access Toolbar” tab to achieve it.
- Finally you can take a shot.
- Firstly, select an email which contains several tables.
- Then click on the new macro button in Quick Access Toolbar.
- At once, all tables will be print out in individual pages.
Method 2: Print All Tables in Series
- In the first place, follow the Step 1 to 2 of above way to head to the “Microsoft Visual Basic for Applications” window.
- Then access an unused module, in which you need to copy the following VBA code into it.
Sub PrintAllTables_inOutlookEmail_Continuously() Dim objMail As Outlook.MailItem Dim objMailDocument As Word.Document Dim objTable As Word.Table Dim lTableCount As Long Dim objWordApp As Word.Application Dim objWordDocument As Word.Document Dim objCell As Word.Cell Set objMail = Outlook.Application.ActiveExplorer.Selection.Item(1) Set objMailDocument = objMail.GetInspector.WordEditor 'Create a Word Document Set objWordApp = CreateObject("Word.Application") Set objWordDocument = objWordApp.Documents.Add objWordDocument.Activate objWordApp.Visible = True For Each objTable In objMailDocument.Tables objTable.Range.Copy 'Copy All Tables into One Word Document With objWordDocument.Range .Collapse wdCollapseEnd .PasteSpecial wdPasteRTF .Text = vbCrLf End With Next 'Print out the Word Document objWordDocument.PrintOut objWordDocument.Close False objWordApp.Quit End Sub
- Later you can add the new macro to Quick Access Toolbar.
- Eventually you select a source mail and hit the macro button in Quick Access Toolbar. Immediately, all the tables in this email will be copied into one Word document, which will be printed out now.
Guard Outlook Data against Corruption
Despite with numerous capabilities, Outlook cannot escape from error, crash and corruption. Thus, once you encounter a crash, your Outlook data will tend to give you a farewell. Hence, so as to prevent Outlook corruption, you need make some efforts, such as blocking hidden viruses, keeping closing Outlook properly and so on. Plus, it is prudent to get hold of an experienced repair tool, like 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 fix mdf and outlook repair software products. For more information visit www.datanumen.comc