Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Repeat Excel Headers in Word 2

Status
Not open for further replies.

risk99

Technical User
Mar 23, 2003
44
US
Hi, I couldn't figure this simple Excel to Word problem, please help!

In Excel, when you go to print titles in Page Setup, you're allowed to select the rows to be repeated, so the rows that are selected can be printed out on each page. But, I want to copy my Excel list onto Word, and need to title rows to be shown on each page as well. So, is there any better way to perform this? Thanks a lot!!!
 
risk,

The repeat rows/columns in Excel is for PRINTING. Notice, that as you "page" thru your Excel sheet, the repeat rows/columns do NOT hold.

You must use Window/Freeze Panes to accomplish that.

:)

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
It would definitely have to be a custom solution. Say the first two rows were header rows: one approach would be to write code in Excel that:

1) Somehow calculated how many rows (x) will fit on a Word page (or just predetermine a value and hardcode it in)
2) Copied your list/data to a temporary worksheet
3) Copied rows 1 - x to your Word document, then inserted a page break into your Word document.
4) Deleted rows 3 - x from your temporary sheet
5) Repeated 3 & 4 until the end of your data was reached.

This would actually create a seperate worksheet object in your Word document for every page. That would work well for visual purposes and for printing, but obviously would cause problems for any live formulas in the worksheet (especially "grand total" type formulas).

All depends on what your purpose is in having the Excel stuff in Word.

Hope that at least gives you some ideas!
 
Take a look at the HeadingFormat property of a word's table's row.
With other words, put your excel sheet in a word table, then you can choose how many rows will be repeated accross pages.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Hi risk99,

I know this is the VBA Forum, but this doesn't really seem like a VBA question, so to do as PHV suggests without code just select the rows in your Word Table you want repeated and Select Table > Heading Rows Repeat. But do note that this is not a print-only option like Excel, the heading rows will show on every page in your document all the time.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
Guys,

Thank you very much for all the inputs!!! PHV and Tony, thanks a lot!!! That was exactly what I wanted, have a great weekend everyone!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top