linking frames for text overflow

M

MRupel

Hello,

I am trying to make a template. There will be 2 stationary frames for text
and one linked frame for overflow to another page. I have already linked the
2 frames. The first one is on page 1 and the second one is on page 2. That
all works fine. But if there is overflow from page 2 I know I need to make a
page 3 and link that frame to page 2. But what if there is no text overflow
to page 3.....will it print a blank page? How do I make it so it knows to
automatically overflow (if necessary)?
 
D

Doug Robbins - Word MVP

Set up the document with the third page containing a text box that is linked
to that on page 2 and use a macro containing the following code to print the
document:

Dim LastPage As String
With ActiveDocument
With .Shapes(2).TextFrame
If .Overflowing = True Then
LastPage = "3"
Else
LastPage = "2"
End If
End With
.PrintOut Range:=wdPrintFromTo, From:="1", To:=LastPage
End With


--
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, originally posted via msnews.microsoft.com
 
M

MRupel

Thank you Doug! Haven't tried it yet but I'm working on it. Something else came to mind.... When the text overflows to the new page I need for the other 2 stationary fields to be on the newly created page. Not only for printing reasons but also for data entry reasons. Any thoughts
 
D

Doug Robbins - Word MVP

You could have an empty paragraph before the first textbox to which you add
a bookmark (say "Box1") and then if the .Overflowing property of the second
textbox is true, format that paragraph in that bookmark so that it has a
page break before it, using:

Dim LastPage As String
With ActiveDocument
With .Shapes(1).TextFrame
If .Overflowing = True Then
LastPage = "2"
Else
LastPage = "1"
End If
End With
If LastPage = "2" Then
.Bookmarks("Box1").Range.ParagraphFormat.PageBreakBefore = True
End If
.PrintOut Range:=wdPrintFromTo, From:="1", To:=LastPage
End With
MsgBox LastPage

You may want to reduce the size of the linespacing for the paragraph to
which the bookmark is applied to the minimum so that the empty paragraph
doesn't screw up the layout any more than cannot be avoided.

--
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, originally posted via msnews.microsoft.com
 
M

MRupel

Also, I was trying to do this with Word 97 or something and I saved it .doc and .txt but neither would retain the formatting. So I am going to use Word 2000. Will the Word 2000 document open in Word 2007?
 
D

Doug Robbins - Word MVP

I am not sure too what formatting you are referring. regular Word
formatting would be retained if a document was saved as a Word document
(.doc); it will not be retained if the document is saved as a text file
(.txt).

Word 2007 will open Word 97 - 2003 documents in compatibility mode.

--
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, originally posted via msnews.microsoft.com
 
M

MRupel

Hi Doug,

Thank you so much for your help. I've been trying to make a one page
template where there are three areas for text input. The problem I'm having
is: if there is more text than just the first page I need it to create a
second or third page with the 3 areas. How can I do this?
 
D

Doug Robbins - Word MVP

Is this question related to something different from that in respect of
which I have provided the previous responses. If so, maybe you should not
be using text boxes.

--
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, originally posted via msnews.microsoft.com
 
D

Doug Robbins - Word MVP

Did not the information that I posted for your previously do what you want?

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.
 
M

MRupel

It seems that the "box1" is inside the main content area instead of above it.
I also need a "box2" to generate below the main content area. Any thoughts?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top