Creating documents from an Excel file

KittyRacer

New Member
Joined
Nov 12, 2010
Messages
8
I receive an Excel file from our customer with 6 lines of contact info (from a single merged column F&G:4-F&G:9) at the top of the sheet and 1-to-25 lines of stuff ordered (10 columns B-K, rows 19 to end of data) across the bottom of the sheet. I need to print purchase orders from this sheet for two products, which I can do via a flag elsewhere on the top of the sheet. Mail merge in MS Word is easy, except for the 6 lines of contact info at the top of the page and the product flag. (All will get product 1, or get product 1 and 2 or so forth.)

I can write a macro that will expand the number of columns across the bottom of the page, copy the contact info down to each row, delete the top of the file (so column labels will be in the first row), then somehow execute a mail merge. (I've tried a macro with the dual objExcel and objWord definitions but the sample code I was following didn't loop. That could have been from other problems. I'm also not sure whether to run it form Word or Excel.)

OR

Copy the data from the customer supplied spreadsheet into my own working sheet with my own headings, then executing the Word mail merge from a constant file. (I think this does not work because Word recognizes that the source file has changed since the last read then wants to reconnect a source file. Is there a way to command-line-launch for Word, calling a document with a reference to the merge data?)

OR

I'm open for ideas.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,223,237
Messages
6,170,924
Members
452,366
Latest member
TePunaBloke

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