How transpose paragraph with the previous one.

D

dbuchanan

Here is my attempt at transposing the current paragraph with the one
above.

What my code does in stead is replace the paragraph above with the
current paragraph.

How should I do this?

Sub MoveUp()
Selection.Paragraphs(1).Range.Select
Selection.Cut
Selection.Previous(Unit:=wdParagraph, Count:=1).Select
Selection.Paste
End Sub

Thank you,

word vba newbie
 
J

Jezebel

Selection.Paragraphs(1).Range.Relocate Direction:=wdRelocateUp

The Help files say you have to be in Outline view to use Relocate, but at
least in W2003 it works in Print and Normal view also.
 
D

dbuchanan

Jezebel,

Thank you so much. It works for me, I am using Word 2003.

I did my research in help but it is quie fruitless trying trying to
find something in help if you don't already know the language. I would
have never imagined "relocate". Help doesn't give many useful clues.
 
Top