A
aehan
I have created a tempate that has a different first page header/footer and
odd/even headers/footers for the rest of the document. I want to start the
second page of the document as two even columns (the first page is not in
columns). Users are not regular Word users, therefore I have a macro that
does that for them (see below). However, when you run the macro the odd/even
page header that has been set up changes and instead the header for the first
page is inserted. The code finds the first character on the current page,
inserts a continuous section break and sets up 2 even spaced columns. Does
anyone know why it plays havoc withthe header? I'd be really interested to
know and grateful for a solution.
The code is:
Sub ConvertToColumns()
'converts the contents of the current page to two equal columns
' moves to te left of the first character at the top of the current page
Selection.Bookmarks("\Page").Select
Selection.Collapse wdCollapseStart
'creates a continuous section break and two even columns
With Selection.PageSetup.TextColumns
.SetCount NumColumns:=2
.EvenlySpaced = True
.LineBetween = False
.Width = CentimetersToPoints(6.69)
.Spacing = CentimetersToPoints(1.27)
End With
'moves to the right of the last character on the page window (not to footer)
Selection.Bookmarks("\Page").Select
Selection.Collapse wdCollapseEnd
End Sub
Thanks for any help
Aehan
odd/even headers/footers for the rest of the document. I want to start the
second page of the document as two even columns (the first page is not in
columns). Users are not regular Word users, therefore I have a macro that
does that for them (see below). However, when you run the macro the odd/even
page header that has been set up changes and instead the header for the first
page is inserted. The code finds the first character on the current page,
inserts a continuous section break and sets up 2 even spaced columns. Does
anyone know why it plays havoc withthe header? I'd be really interested to
know and grateful for a solution.
The code is:
Sub ConvertToColumns()
'converts the contents of the current page to two equal columns
' moves to te left of the first character at the top of the current page
Selection.Bookmarks("\Page").Select
Selection.Collapse wdCollapseStart
'creates a continuous section break and two even columns
With Selection.PageSetup.TextColumns
.SetCount NumColumns:=2
.EvenlySpaced = True
.LineBetween = False
.Width = CentimetersToPoints(6.69)
.Spacing = CentimetersToPoints(1.27)
End With
'moves to the right of the last character on the page window (not to footer)
Selection.Bookmarks("\Page").Select
Selection.Collapse wdCollapseEnd
End Sub
Thanks for any help
Aehan