How to Copy Multiple Excel Tables into Separate Sections of an Outlook Email using VBA
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.

- 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.
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.
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.
In your VBA script, declare an object for the email inspector. For example: 'Set objDoc = myMailItem.GetInspector.WordEditor'.
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'.
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'.
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.

Use HTMLBody Tags for Table Separation
If you are building your email by converting Excel ranges to HTML strings, you can easily separate tables by concatenating standard HTML line breaks.
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. Download the software: Visit the official WPS website to download the free installation package for your operating system.
- 2. Install and launch: Run the installer to complete the setup, then open WPS Spreadsheets.
- 3. Open your files directly: Open your existing Excel workbooks in WPS without worrying about losing your formatting or data structures.

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.




