![]() |
|
|
Thread Tools | Display Modes |
#15
|
|||
|
|||
![]()
One more point (on a different matter).
One thing impresses me in your code : you manage to move a paragraph with no change in the page display. I've made lots of macros to move paragraphs from one place to another in my todolist. The only method I've found (due to my lack of knowledge in VBA) is to insert a chain (say "µµµµ") then move the paragraph, then move back to the chain, then delete it, which may make unpleasant display changes. Is there a way to improve this archaic method to get the same result than in you macro : move a paragraph while the display remains unchanged ? Many thanks ! HTML Code:
Sub Move_To_Next_Monday() ' this macro finds the next paragraph starting with "~Monday" then moves the selected chain one line further then goes back to where the selected text was at the beginning Application.ScreenUpdating = False Selection.HomeKey Unit:=wdLine Selection.EndKey Unit:=wdLine, Extend:=wdExtend Selection.Cut Selection.TypeText Text:="µµµµ" Selection.Find.ClearFormatting With Selection.Find .Text = "~Monday" .Replacement.Text = "" .Forward = True End With Selection.Find.Execute Selection.HomeKey Unit:=wdLine Selection.MoveDown Unit:=wdLine, Count:=1 Selection.Paste Selection.HomeKey Unit:=wdStory Selection.Find.ClearFormatting With Selection.Find .Text = "µµµµ" .Replacement.Text = "" .Forward = True End With Selection.Find.Execute Selection.Delete Unit:=wdCharacter, Count:=1 End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
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 |
![]() |
Chayes | Word VBA | 2 | 11-26-2013 01:16 PM |
![]() |
garlapati | Word | 5 | 04-04-2011 02:05 PM |