Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
tbaam
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.tables
Helmut Weber
 
Posts: n/a
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to start page 1 numbering after five pages - how? RM Page Layout 6 April 5th 06 05:07 AM
Number of pages should restart with section page numbers Jim B Microsoft Word Help 7 March 12th 06 02:13 PM
adding pages MoJR Microsoft Word Help 23 February 28th 06 04:51 PM
Print individual page in book fold AnnetteClements Microsoft Word Help 2 July 5th 05 01:18 AM
Page number difficulties Tjodrik Microsoft Word Help 3 May 9th 05 02:54 PM


All times are GMT +1. The time now is 01:48 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"