Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2006

Tip: Looking for answers? Try searching our database.

How to detect content outside of page margins?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rVo - 23 Feb 2006 12:15 GMT
Is there a way to detect tat certain elements on a page are (partly) outside
of the page margins?

Thanks for your time/advice.

Kind regards,

rVo
Cindy M  -WordMVP- - 24 Feb 2006 09:45 GMT
Hi RVo,

> Is there a way to detect tat certain elements on a page are (partly) outside
> of the page margins?

What kinds of elements do you have in mind?

Basically, you'd have to check the position and compare it to the margin
settings. How to check the position depends on what's involved...

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 :-)
rVo - 24 Feb 2006 10:51 GMT
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 :-)

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.