VBA & Macro Problems

How to Copy Multiple Excel Tables into Separate Sections of an Outlook Email using VBA

Adam DavisAdam Davis Nov 3, 2026 869 views

Question details

The user wants to copy multiple Excel tables into an Outlook email using VBA and needs them separated by text or line breaks to prevent them from merging into one block.

How to Copy Multiple Excel Tables into Separate Sections of an Outlook Email via VBA
Product
Excel
Device & OS
not provided
Scenario
Automating email creation by copying multiple different data ranges or tables from an Excel spreadsheet into an Outlook email body.
Observed behavior
When the tables are pasted into the email, they appear joined together as a single continuous table instead of being separated by paragraphs or line breaks.
Before you start

Ensure you have enabled the 'Microsoft Word Object Library' and 'Microsoft Outlook Object Library' in your VBA Editor (Tools > References) to properly manipulate the email's body formatting.

Solution 1Recommended

Insert Paragraph Breaks using the WordEditor Object

The most reliable method to format elements inside an Outlook email via Excel VBA is to utilize the Word Object Model (WordEditor) to insert explicit paragraph breaks between paste actions.

Because Outlook uses Microsoft Word as its email editor, you can access the Word Document object inside your Outlook MailItem. By doing this, you can move the cursor, paste a table, insert a paragraph break, and then paste the next table sequentially.

1
Set up the WordEditor object

In your VBA script, declare an object for the email inspector. For example: 'Set objDoc = myMailItem.GetInspector.WordEditor'.

2
Copy and paste the first table

Copy your first Excel range using 'Range("A1:C5").Copy'. Then, use the WordEditor selection to paste it into the email: 'objDoc.Application.Selection.Paste'.

3
Insert a paragraph break

After pasting the first table, move the selection to the end and insert a break using 'objDoc.Application.Selection.TypeParagraph' or 'objDoc.Application.Selection.InsertAfter vbCrLf'.

4
Collapse selection and paste the next table

Collapse the selection range to the end of the newly inserted paragraph break ('objDoc.Application.Selection.Collapse Direction:=0') and proceed to paste the second Excel table.

Insert Paragraph Breaks using the WordEditor Object
Pro Tip: You can also insert descriptive text strings between tables using the 'InsertAfter' method to give context to each dataset.
Free Microsoft Office alternative

Experience Seamless Spreadsheet Management with WPS Office

Dealing with complex VBA macros and formatting issues in Microsoft Office can be frustrating. WPS Office offers a free, lightweight, and highly compatible alternative that seamlessly handles standard Excel files with a familiar interface, making your daily work effortless.

  1. 1. Download the software: Visit the official WPS website to download the free installation package for your operating system.
  2. 2. Install and launch: Run the installer to complete the setup, then open WPS Spreadsheets.
  3. 3. Open your files directly: Open your existing Excel workbooks in WPS without worrying about losing your formatting or data structures.
Fully compatible with Microsoft Excel formats (XLSX, XLSM, CSV)Lightweight software with significantly faster processing and startup timesFamiliar user interface that requires zero learning curve to masterCost-effective solution packed with powerful data analysis and visualization tools
microsoft office alternative - wps office

Frequently Asked Questions

Why do my pasted Excel tables automatically merge in Outlook?

When tables are pasted consecutively without any intervening text, spaces, or paragraph breaks, Outlook's Word-based rendering engine automatically joins them into a single, continuous table structure.

Can I use 'vbCrLf' directly in the email body to separate tables?

If you are using the WordEditor object model in VBA, you can insert 'vbCrLf' to simulate an Enter keystroke. However, simply appending 'vbCrLf' to an HTMLBody string will not work; you must use '<br>' tags for HTML.

How do I access the Outlook email body formatting in Excel VBA?

You can access the formatting controls by assigning an object variable to 'MailItem.GetInspector.WordEditor'. This exposes the Microsoft Word Object Model, allowing you to use Word VBA commands to accurately control placement and paragraphs within the email.