Copying multiple rtf file contents with formatting into a single cell in Excel


New Member
Nov 13, 2019
I am busy making an eCommerce website, I have made a csv database with all the information that I need.
The issue I am facing now, I have thousands of rtf files for each items product description that I would like to add into excel.
The contents of each rtf file should be copied into a single cell into excel ie. 1 rtf file contents = 1 cell in excel with formatting.

I have tried pasting the link of the rtf file from the server into excel but the website just displays the link.
Is there any VBA code or macro I could run to solve this issue? Or is there another way I could link my rtf file into WooCommerce to display the contents of the rtf file on my website?

I have tried the following code (The first response by Andrew Poulsom):

Which works including the formatting but distributes the contents into different cells and works for only 1 file at a time.

I don't want to open,copy and paste every rtf file into excel and have researched for quite a while on how to do this.
Any help will be appreciated ^_^

Some videos you may like

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.


New Member
Nov 13, 2019
I can't find where I can edit my post, I missed some critical information.
The name of the rtf file is the, product name.rtf. The product name is in column A of my excel database.

Here is the code that I tried used, posted by Mr Andrew Poulsom in the link above:
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;">Sub Test()
Dim WordApp As Object
Set WordApp = CreateObject("Word.Application")
With WordApp
' Change file name to suit
.Documents.Open Filename:="P:\TEMP\MrExcel\RTFFile.rtf"
End With
Set WordApp = Nothing
End Sub</code>


MrExcel MVP, Moderator
May 28, 2005
Office Version
I can't find where I can edit my post, I missed some critical information.
There is only a short period of time when you might be able to edit your post. Otherwise, do what you have done and just make another post explaining the changes you want to make.


New Member
Nov 13, 2019
Can no one help me?
How would most eCommerce websites go about doing this with thousands of products?
I got the images and the rtf files (for the description of each item) from the supplier.

Watch MrExcel Video

Forum statistics

Latest member

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...