![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#18
|
||||
|
||||
|
The display HAS to change because you are moving a paragraph where the cursor is sitting to another location but you don't need to move the cursor.
Code:
Sub Move_To_Next_Monday()
Dim oRng As Range, oSel As Range
Set oSel = Selection.Range.Paragraphs(1).Range
Set oRng = ActiveDocument.Range
oRng.Start = oSel.End
If oRng.Find.Execute("~Monday") Then
oRng.Start = oRng.Paragraphs(1).Range.End
oRng.FormattedText = oSel.FormattedText
oSel.Delete
End If
lbl_Exit:
Set oRng = Nothing
Set oSel = Nothing
End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Document starts to red line spaces and formatting appears on right side
|
Richtriebe | Word | 2 | 03-23-2017 11:53 AM |
| Bold each line of text that starts with a recurring symbol | qubie | Word | 6 | 08-26-2016 07:10 AM |
| Lock line so text does not move to next line | saundrals | Word | 2 | 06-19-2014 03:59 PM |
Identify certain text and move all phrases containing it down a line
|
Chayes | Word VBA | 2 | 11-26-2013 01:16 PM |
How to give line numbering to only selected text?
|
garlapati | Word | 5 | 04-04-2011 02:05 PM |