VBA: Exporting Spreadsheet to Multiple Word Files With Added Formatting

Saighead

New Member
Joined
May 17, 2013
Messages
34
Hi,
I have a VERY long spreadsheet that I need to export into Word splitting the data into multiple segments in the process and saving each segment as a separate Word file. Is is doable?


[column1] [column 2] ....
code001 entry1
code001 entry2
....
code099 entry1, etc.

What I really need here is to have Excel create a file "Code001.docx" containing all entries for [columns 1-5] where [column 1] = "code001", then create a file "Code002.docx" containing all entries for [columns 1-5] where [column 1] = "code002" and so on. It would be absolutely terrific if there was a way to make Excel automatically put "Code001", "Code002", etc as a header into every file (and make the header itself 0.7'' in height), and format the data into 2 columns with a line between and a 1'' gap between the columns.


If this is not an outlandishly tall order, any help would be much appreciated.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,214,973
Messages
6,122,534
Members
449,088
Latest member
RandomExceller01

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