Bonjour Forum,
Pour m’aider dans l’écriture d’un texte assez long, j’ai besoin d’une macro qui « envoie » la ligne courante à la fin du document (pour mettre de côté des bribes de texte inutilisées).
Malheureusement, celle que j’ai mise au point (bidouillé serait plus juste) modifie l’affichage.
Quelqu’un pourrait-il m’aider à revoir cette macro pour que le texte de la ligne courante parte à la fin du doc, sans que l’affichage se modifie ?
Merci !!!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 Sub Envoyer_à_la_fin() Application.ScreenUpdating = False Selection.HomeKey Unit:=wdLine Selection.EndKey Unit:=wdLine, Extend:=wdExtend Selection.Cut Selection.TypeText Text:="$ù$ù" Selection.EndKey Unit:=wdStory Selection.PasteAndFormat (wdFormatOriginalFormatting) Selection.HomeKey Unit:=wdStory Selection.Find.ClearFormatting With Selection.Find .Text = "$ù$ù" .Replacement.Text = "@@@@" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Selection.HomeKey Unit:=wdLine Selection.Delete Unit:=wdCharacter, Count:=1 Selection.Delete Unit:=wdCharacter, Count:=1 Selection.Delete Unit:=wdCharacter, Count:=1 Selection.Delete Unit:=wdCharacter, Count:=1 'Application.ScreenUpdating = True End Sub
Partager