Hi Cindy,
I would like to know if a table extends outside the page margins and if so
set the section in which the table is positioned in landscape mode (if it
wasn't already).
Upto now (been playing around with it) I came up with... (have to put
everything into comment because of paranoid firewall, sorry for that)
'Sub test()
' Dim tbl As Table
' Dim tblColumn As Column
' Dim tblWidth As Integer
'
' tblWidth = 0
'
' For Each tbl In ActiveDocument.Content
' For Each tblColumn In tbl.Columns
' tblWidth = tblWidth + tblColumn.Width
' Next clm
' If tblWidth > ActiveDocument.PageSetup.PageWidth Then
' 'stuck here
' End If
' tblWidth = 0
' Next tbl
'
'End Sub
Kind regards,
rVo
"Cindy M -WordMVP-" <C.Meister-C@hispeed.ch> schreef in bericht
news:VA.0000ba90.0081d240@speedy...
> Hi RVo,
>
[quoted text clipped - 13 lines]
> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)
Cindy M -WordMVP- - 28 Feb 2006 18:13 GMT
Hi RVo,
> I would like to know if a table extends outside the page margins and if so
> set the section in which the table is positioned in landscape mode (if it
> wasn't already).
> Upto now (been playing around with it) I came up with... (have to put
> everything into comment because of paranoid firewall, sorry for that)
>
This is probably the best way to approach the problem. If you were concerned
about the left margin, then there would be an alternative or two. But since
you can't be sure that any text in the last column would actually be outside
the margin...
> 'Sub test()
> ' Dim tbl As Table
[quoted text clipped - 14 lines]
> '
> 'End Sub
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)