Word command that moves the current paragraph up or down?

New Daddy
4StarLounger
Posts: 437
Joined: 05 Nov 2012, 20:02

Word command that moves the current paragraph up or down?

Post by New Daddy »

Is there a Word command that moves the current paragraph up or down? Maybe it's my habit, but I happen to fall into a situation where I need to push a paragraph up or down.

I've downloaded the Word command excel file mentioned in another thread, but couldn't find one. There are OutlineMoveUp and OutlineMoveDown, but these don't seem to work well in non-Outline view. In a non-Outline view, these commands send the current paragraph to weird places, not single paragraph up or down.
Last edited by New Daddy on 13 Apr 2014, 18:46, edited 1 time in total.

User avatar
HansV
Administrator
Posts: 78457
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Word command that moves the current paragraph up or down

Post by HansV »

There is no built-in shortcut to move a paragraph up or down if you're not in outline view.
Best wishes,
Hans

User avatar
StuartR
Administrator
Posts: 12604
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Word command that moves the current paragraph up or down

Post by StuartR »

Try
Selection.Range.Relocate wdRelocateUp
and
Selection.Range.Relocate wdRelocateDown

Keyboard shortcuts for this are Alt-Shift-UpArrow and Alt-Shift-DownArrow
StuartR


User avatar
HansV
Administrator
Posts: 78457
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Word command that moves the current paragraph up or down

Post by HansV »

Yes, that's the way to do it using VBA. In macros:

Code: Select all

Sub MoveSelDown()
    Selection.Range.Relocate wdRelocateDown
End Sub

Sub MoveSelUp()
    Selection.Range.Relocate wdRelocateUp
End Sub
You might store these macros in your Normal.dot(m) template and assign them to custom keyboard shortcuts.
Best wishes,
Hans

New Daddy
4StarLounger
Posts: 437
Joined: 05 Nov 2012, 20:02

Re: Word command that moves the current paragraph up or down

Post by New Daddy »

StuartR wrote:Try
Selection.Range.Relocate wdRelocateUp
and
Selection.Range.Relocate wdRelocateDown

Keyboard shortcuts for this are Alt-Shift-UpArrow and Alt-Shift-DownArrow
Mmm. This is strange. It does the same weird thing as pressing the native Alt-Shift+up/down arrows. It sends the paragraph to unpredictable places; e.g., down to where the next section begins instead of one paragraph down, or to the end of the previous Heading instead of one paragraph up.

Incidentally, I just found on http://word.mvps.org/faqs/general/CommandsList.htm" onclick="window.open(this.href);return false; that Alt+Shift+up/down arrows ARE supposed to move the paragraph up or down even in the Normal/Page view. Something is seriously screwed in my Word 2003.

User avatar
HansV
Administrator
Posts: 78457
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Word command that moves the current paragraph up or down

Post by HansV »

What happens if you activate the Customize Keyboard dialog, click in the 'Press new shortcut key' box and press Alt+Shift+Up? On my PC, I see 'Currently assigned to: OutlineMoveUp':
S0706.png
And similar for Alt+Shift+Down.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

User avatar
StuartR
Administrator
Posts: 12604
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Word command that moves the current paragraph up or down

Post by StuartR »

Can you turn on display of all non-printing characters and check that you have real paragraph marks, and not new-line marks, at the end of each paragraph.
StuartR


New Daddy
4StarLounger
Posts: 437
Joined: 05 Nov 2012, 20:02

Re: Word command that moves the current paragraph up or down

Post by New Daddy »

HansV wrote:What happens if you activate the Customize Keyboard dialog, click in the 'Press new shortcut key' box and press Alt+Shift+Up? On my PC, I see 'Currently assigned to: OutlineMoveUp':
S0706.png
And similar for Alt+Shift+Down.
Same here.

New Daddy
4StarLounger
Posts: 437
Joined: 05 Nov 2012, 20:02

Re: Word command that moves the current paragraph up or down

Post by New Daddy »

StuartR wrote:Can you turn on display of all non-printing characters and check that you have real paragraph marks, and not new-line marks, at the end of each paragraph.
Yes, I have real paragraph marks.

New Daddy
4StarLounger
Posts: 437
Joined: 05 Nov 2012, 20:02

Re: Word command that moves the current paragraph up or down

Post by New Daddy »

Another critical info for my problem:

I just created a new document with only 7-8 sample paragraphs. And the Alt+Shift+up/down arrows work!
So the problem is specific to this particular long, complex, outline-numbered, revision-tracked, full-of-fields document. Just to rule out the easiest, I accepted all revisions, but the problem persists. So I know it's not due to the tracked revisions. Oh well, I will just chalk it up to one of Word's numerous idiosyncrasies. Hopefully Word 2013 won't have this bug.

User avatar
HansV
Administrator
Posts: 78457
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Word command that moves the current paragraph up or down

Post by HansV »

Remark: this question has been cross-posted at http://www.msofficeforums.com/word-vba/ ... -down.html" onclick="window.open(this.href);return false;. See there for additional information.
Best wishes,
Hans