View Single Post
 
Old 07-15-2025, 03:58 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by mrhurley View Post
One question as I try to understand the solution is the last line below:

With oTbl
With .Rows(x + 1)
.Height = Hght

"Hght" doesn't seem to be defined anywhere. Is this a universal variable or am I missing something.
It's defined at:
Sub FormatRows(oTbl As Table, x As Long, Hght As Single)
Quote:
Originally Posted by mrhurley View Post
Also - is there a way to inside a page break after every fourth row so I always start a page with a caption row.
Inserting page breaks breaks the table into multiple separate tables and would require a significant re-write of the code. You should be able to achieve the same result by changing the TblPic Style's 'Keep With Next' attribute. To do that change:
.KeepWithNext = True
to
.KeepWithNext = False
and by inserting
.KeepWithNext = True
after:
.Range.Style = "Normal"
in the FormatRows sub.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote