judithsuncoast said:
In Publisher 2003, I'm working with a very large file (a book) and want to
Autoflow text into only left hand text boxes - 3 boxes per page, equal long
boxes for text and a footnote box across width of page at foot.
Can anyone suggest a macro or another way of doing this, for an appreciative
not-quite novice?
Are the pages already created, or do you want the macro to also create
the pages (slightly easier)? Do you want the middle and right columns to
link to each other, too?
I wrote a macro to do this a couple of weeks ago - I'll try and dig it
out now...
Here it is:
Sub CreateTextBoxen
Dim LTB1 As Shape, LTB2 As Shape
Dim RTB1 As Shape, RTB2 As Shape
Dim aPage As Page
Dim i As Integer
Dim n As Integer = 100 'number of pages
Dim ltb_width As Integer = 500 'left text box width, in points
Dim rtb_width As Integer = 500 'right text box width, in points
Dim ltb_top As Integer = 500 'vertical co-ord of ltb in points
Dim rtb_top As Integer = 500 'vertical co-ord of rtb in points
Dim ltb_height As Integer = 500 'ltb height, in points
Dim rtb_height As Integer = 500 'rtb height, in points
Dim ltb_left As Integer = 1000 'hzontal co-ord of ltb in points
Dim rtb_left As Integer = 500 'hzontal co-ord of rtb in points
Set aPage = ThisDocument.ActiveView.ActivePage
Set LTB2 = aPage.Shapes.AddTextbox(pbTextOrientationHorizontal,
ltb_left, ltb_top, ltb_width, ltb_height)
Set RTB2 = aPage.Shapes.AddTextbox(pbTextOrientationHorizontal,
rtb_left, rtb_top, rtb_width, rtb_height)
For i = 2 to n
Set LTB1 = LTB2
Set RTB1 = RTB2
Set aPage = ThisDocument.Pages.Add(1, ThisDocument.Pages.Count)
Set LTB2 = aPage.Shapes.AddTextbox(pbTextOrientationHorizontal,
ltb_left, ltb_top, ltb_width, ltb_height)
Set RTB2 = aPage.Shapes.AddTextbox(pbTextOrientationHorizontal,
rtb_left, rtb_top, rtb_width, rtb_height)
Set LTB1.TextFrame.NextLinkedTextFrame = LTB2.TextFrame
Set RTB1.TextFrame.NextLinkedTextFrame = RTB2.TextFrame
Next i
End Sub
(wrapping problems will need to be fixed, and this sub will only create
two text boxes per page)