VBA Problem Word Section

I want in a dcoument that every pages is a section. It doesnt work. Perhaps someone wants to help me?

The problem it inserts it at the end of the document and not at the start???? I do not know how to solve that problem..

My source code is below.



Sub AddSectionEveryPage()

Dim intTeller As Integer

ActiveDocument.GoTo (1)

' browse per pagina

Application.Browser.Target = wdBrowsePage

For intTeller = 1 To ActiveDocument.BuiltInDocumentProperties("Number of Pages")

If ActiveDocument.Sections.Count < intTeller Then

Selection.InsertBreak Type:=wdSectionBreakContinuous

Application.Browser.Next

End If

Next intTeller

MsgBox "Number of sections: " & ActiveDocument.Sections.Count

End Sub


URL:n/a

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories