Moving Document Section

G

Graham Mayor

Dim sCurSection As String
sCurSection = Selection.Information(wdActiveEndSectionNumber)
ActiveDocument.Sections(sCurSection).Range.Select

will select the current section. Where do you want to move it to?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
D

DMc2007

Say if I have got ten sections in a document, i would want to move section 3
to before section 6.

Regards

D
 
G

Graham Mayor

With ActiveDocument
.Sections(3).Range.Cut
.Sections(5).Range.Select
With Selection
.Collapse wdCollapseStart
.Paste
End With
End With

Note that when you have cut section 3, section 6 would then be section 5.
When Section 3 is placed in its new position *it* will then be section 5 and
Section 6 will again be Section 6


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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

Top