Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word VBA

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 04-13-2014, 11:47 AM
New Daddy New Daddy is offline Windows Vista Office 2003
Advanced Beginner
 
Join Date: Jan 2012
Posts: 90
New Daddy is on a distinguished road
Default A macro 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.

There are Word commands OutlineMoveUp and OutlineMoveDown, which work as their names suggest in the Outline view. But in a non-Outline view, these commands send the current paragraph to weird places instead of moving it single paragraph up or down.

Can someone show me what a macro that moves the current paragraph up or down look like? Than I will map them to Alt+Shift+up/down arrow keys.
Reply With Quote
  #2  
Old 04-13-2014, 12:52 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 18,033
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Why not just select the paragraph (e.g. triple-click), then drag it to where you want? A macro couldn't do it any faster for moving more than one paragraph (since it can't be programmed to know what you want without input boxes and the like), apart from which, you'd need two macros - one for moving up and another for moving down.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 04-13-2014, 02:25 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 18,033
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Cross-posted at: http://www.eileenslounge.com/posting...y&f=26&t=16158
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184

PS: I note the cross-posting issue has been drawn to your attention previously (http://www.msofficeforums.com/word-v...footnotes.html). Please don't make a habit of not providing links to your cross-posts, or you won't be welcome here.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro, data import from the ONLY text file in current folder ue418 Excel Programming 5 10-28-2017 12:52 PM
Need a Macro that Combines Every 5 sentences into a paragraph jgarland Word 22 01-11-2012 11:19 AM
How to call current PC date and/or current PC year KIM SOLIS Excel 2 11-04-2011 06:09 PM
Macro for moving one cell down from current position Johnny thunder Word 3 04-07-2011 04:44 PM
Auto insert current month's name and current year Styler001 Word 4 01-25-2010 06:40 PM


All times are GMT -7. The time now is 09:59 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft