Excel and Word - VBA to Copy Word document to excel sheet

Plokimu77

Board Regular
Joined
Oct 1, 2014
Messages
138
Hello Forum,

1)
Is it possible to have a code that will copy all the text in a word document that is located in a folder
and paste it on cell A1 in a excel sheet?

2)
If the above is possible, what if i have multiple word documents in a folder
and i would like them all pasted in individual sheets in the same Excel spreadsheet.
One sheet for each word document.

Thank you for any assistance that can be provided.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Technically, yes, provided the document isn't too large, but you'd be liable to lose all the document formatting, as well as headers, footers, footnotes, tables, textboxes, pictures, etc.
 
Upvote 0
Just to clarify: you want the contents of the entire document in cell A1, not separate cells for each paragraph?
 
Upvote 0
Yes sir.

When performing the task manually, I select all the text on the word document and just paste on cell A1 in excel.

Thank you.
 
Upvote 0
You have not answered my question. Even when you do the copying & pasting manually, the pasted content could all end up in one cell or with each paragraph on a new row - it all depends on the method you use.
 
Upvote 0
Each line in the paragraph goes on a new row.

If a paragraph in the word document has 5 lines, each line ends up in its own individual row in the excel sheet. 5 lines in word document = 5 rows in excel sheet.
 
Upvote 0
Well, that's entirely different to what you previously said and would require a lot of extra work to implement. That's because Word documents don't work with lines - they work with paragraphs whose lines change according to whatever changes you might make to the page layout and according to whatever printer driver you're using.
 
Upvote 0

Forum statistics

Threads
1,225,768
Messages
6,186,924
Members
453,387
Latest member
uzairkhan

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