Error setting AllowBreakAcrossPage
Doug,
The first format of the code I was using is basically the same (I just
replaced i with the assignment) - i still get the same error - Is this
something that cannot be done on a table object? I found in the help that
AllowBreakAcrossPages applies to a Tablestyle object so maybe I am taking the
wrong approach?
Thanks
Jerry
"Doug Robbins - Word MVP" wrote:
Turns out you cannot use the .Count property as I suggested. The following
should work however
Dim i As Long
i = wdApp.ActiveDocument.Tables.Count
wdApp.ActiveDocument.Tables(i).Rows(1).AllowBreakA crossPages = False
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"JWS315" wrote in message
...
Doug,
I tried your suggestion, however I still receive the same error. In
looking
at Word VBA help it states that the AllowBreakAcrossPage property applies
to
a TableStyle object, if this is the case then I would guess that I have
the
wrong statement.
Any suggestions on how the code would look would be appreciated, I have
tried several interations but with no luck.
Thanks
Jerry
"Doug Robbins - Word MVP" wrote:
I would think that this line
wdApp.ActiveDocument.Tables(wdApp.ActiveDocument.T ables.Count).Rows
should be
wdApp.ActiveDocument.Tables.Count.Rows etc.
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"JWS315" wrote in message
...
I get an error trying to set Row 1 of a 2 row table to keep from
breaking
across columns - Not sure what is not correct witht code below? Error
is
438
Object does not support this property or method...
Set myRange = wdApp.Selection.Range
Set myTable = wdApp.ActiveDocument.Tables.Add(myRange, 2, 1,
wdWord9TableBehavior, wdAutoFitWindow)
wdApp.ActiveDocument.Tables(wdApp.ActiveDocument.T ables.Count).Rows(1).AllowBreakAcrossPage
= False
Jerry
|