PDA

View Full Version : Paste excel table into Word and then format?



turkey
08-13-2007, 03:15 PM
I'm copying a table from excel and pasting it into word using wordApp.Selection.PasteExcelTable False, False, False

That works fine but when the table is placed in word it is cut off, and I can't seem to make a macro that will reformat the table to fit in word. I want it to autofit the table to the page and have header rows repeat. I'm using Office 2007.

Any suggestions?

TrippyTom
08-14-2007, 08:49 AM
How about making your own table style?

Here's how you make your own table style:

IN WORD:
1) Setup the table how you want it
2) Go to the TABLE > TABLE AUTOFORMAT menu
3) click NEW
4) Name your new table, and click OK then CLOSE

Next time you want to setup another table, just choose: TABLE > TABLE AUTOFORMAT and choose your user-defined setup.