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

LA_Chaudhry

New Member
Joined
Nov 13, 2019
Messages
4
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): https://www.mrexcel.com/forum/excel-questions/47227-code-open-rtf-file-word.html

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 ^_^
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
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"
.ActiveDocument.Select
.Selection.Copy
End With
ActiveSheet
.Range("A1").Select
ActiveSheet
.Paste
WordApp
.Quit
Set WordApp = Nothing
End Sub</code>
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,237
Members
448,555
Latest member
RobertJones1986

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top