Some users would like to change the styles of all tables in an Outlook email in bulk, rather than selecting tables and changing styles one by one. Now, in this article, we will introduce 2 means to you.
At times, you copied some tables to an email from other sources. If you dislike the original styles of these tables, you may want to change them. You may be used to modifying them one by one. However, it is too troublesome if there are numerous tables in this email. Thereby, here we will share you 2 methods to accomplish this in one go.
Method 1: Batch Change the Styles of All Tables Manually
- First off, open the source email.
- If the email is not the one that you are composing, you should turn into the “Edit Mode” firstly. Click “Actions” > “Edit Message”.
- Then, you should keep holding down “Ctrl” button and select the tables in the email one by one.
- After that, you can switch to “Design” tab under “Table Tools” ribbon.
- Next, in the “Table Styles” group, you should select a target table style as per your needs.
- At once, the styles of all the tables are changed, like the following screenshot:
If there are few tables in this email, this method is still simple and convenient. Yet, if the email contains a great amount of tables, such as 20 or more, selecting them one by one is too tedious. In that case, you apply the VBA code to accomplish it in batches.
Method 2: Batch Change the Styles of All Tables via Outlook VBA
- In the first place, access VBA editor according to “How to Run VBA Code in Your Outlook”.
- next, enable “MS Word Object Library” with reference to “How to Add an Object Library Reference in VBA“.
- Then, put the following VBA code into a module.
Sub BatchChangeStylesOfAllTables () Dim objMail As Outlook.MailItem Dim objMailDocument As Word.Document Dim objTables As Word.Tables Dim objTable As Word.Table 'Get the currently opened email Set objMail = Outlook.Application.ActiveInspector.CurrentItem Set objMailDocument = objMail.GetInspector.WordEditor 'Get all the tables of the current email Set objTables = objMailDocument.Tables 'Convert all tables to text For Each objTable In objTables 'Specify the name of the table style objTable.Style = "Light Shading - Accent 3" Next End Sub
- After that, add the macro to Quick Access Toolbar.
- Finally, all the tables’ styles will be changed to the predefined style.
Equip Your Outlook with a Formidable Repair Tool
Although Outlook comes pre-installed with a built-in repair tool – Scanpst, you’d better not rely on it completely. It is because that this internal utility is only able to deal with small glitches. It’ll definitely fail in coping with severe situations. So, it is essential for us to keep another PST repair utility in vicinity, like DataNumen Outlook Repair. It can fix Outlook issues without breaking a sweat.
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