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.
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.