Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
Last row on each page
I have a macro that copies a number of rows from excel and paste them into
word. The resulting table spans across multuiple pages in word. How do I find the last row on each page? THANKS SO VERY MUCH for your help. Theresa |
#2
Posted to microsoft.public.word.tables
|
|||
|
|||
Last row on each page
Hi,
just the principle, not taking care of _multiple_ tables: Dim l As Long ' just a counter Dim p As Long ' a page Dim r As Long ' a row p = ActiveDocument.BuiltInDocumentProperties("number of pages") For l = 1 To p Selection.GoTo what:=wdGoToPage, _ which:=wdGoToAbsolute, Count:=l r = r + ActiveDocument.Bookmarks("\page").Range.Rows.Count MsgBox "Page: " & l & ", Row: " & r Next The messagebox tells you, which row in _the_ table is the last row on the page. -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Win XP, Office 2003 "red.sys" & Chr$(64) & "t-online.de" |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Want to start page 1 numbering after five pages - how? | Page Layout | |||
Number of pages should restart with section page numbers | Microsoft Word Help | |||
adding pages | Microsoft Word Help | |||
Print individual page in book fold | Microsoft Word Help | |||
Page number difficulties | Microsoft Word Help |