Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / VS Tools for Office / February 2006

Tip: Looking for answers? Try searching our database.

How to track page utilization in Word document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott Wheeler - 19 Feb 2006 12:20 GMT
Hello,

I'm new to VTSO and have what is hopefully a simple question...

I would like to track how many inches of content I have placed on the
current page for the purpose of determining whether or not to 'page break.'
This would also require me to understand how many inches of content I intend
to place on the current page. I suspect this would involve establishing a
range of text to be appended to the current doc (page) and polling its height
(in inches or some other measurement). Is this possible?

Thanks,

Scott
Tobek - 19 Feb 2006 16:02 GMT
This is "not simple" IMHO, as the physical length of text will be determined
by printer scaling, and the necessary position for the page break is also
dependent on the paper size. Word will not do true WYSIWYG layout for you, it
will always be somewhat adjusted by the printer.

From a document structure point of view (independent of code), inserting a
hard page break is almost always a mistake - OK, I haven't actually found a
situation yet in which it is the right choice.

If you are trying to control vertical flow in the document, use the
PageBreakBefore, KeepWithNext, and KeepLinesTogether properties of paragraph
objects. PageBreakBefore set to true ensures that the paragraph to which it
is applies is always situated at the top of a new page, regardless of the
pagination or positioning of the preceding text or objects.

> Hello,
>
[quoted text clipped - 10 lines]
>
> Scott
Scott Wheeler - 19 Feb 2006 17:37 GMT
Thanks Tobek,

I agree that it doesn't appear simple and some level of 'trickery' will need
to be applied. Thanks for recommending some of the techniques available.

Scott

> This is "not simple" IMHO, as the physical length of text will be determined
> by printer scaling, and the necessary position for the page break is also
[quoted text clipped - 25 lines]
> >
> > Scott

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
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.