bonjour
libre office writer Version: 4.2.4.2
j'essaie de réaliser un macro qui change la couleur de mes caractères écrits en rouge dans mon texte en couleur bleu
j'ai enregistrer une macro qui fonctionne à l'enregistrement mais qui ne fonctionne plus ensuite:
Pouvez vous m'aider SVP ?
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98 sub rougebleue rem ---------------------------------------------------------------------- rem define variables dim document as object dim dispatcher as object rem ---------------------------------------------------------------------- rem get access to the document document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") rem ---------------------------------------------------------------------- dim args1(18) as new com.sun.star.beans.PropertyValue args1(0).Name = "SearchItem.StyleFamily" args1(0).Value = 2 args1(1).Name = "SearchItem.CellType" args1(1).Value = 0 args1(2).Name = "SearchItem.RowDirection" args1(2).Value = true args1(3).Name = "SearchItem.AllTables" args1(3).Value = false args1(4).Name = "SearchItem.Backward" args1(4).Value = false args1(5).Name = "SearchItem.Pattern" args1(5).Value = false args1(6).Name = "SearchItem.Content" args1(6).Value = false args1(7).Name = "SearchItem.AsianOptions" args1(7).Value = false args1(8).Name = "SearchItem.AlgorithmType" args1(8).Value = 0 args1(9).Name = "SearchItem.SearchFlags" args1(9).Value = 65536 args1(10).Name = "SearchItem.SearchString" args1(10).Value = "" args1(11).Name = "SearchItem.ReplaceString" args1(11).Value = "" args1(12).Name = "SearchItem.Locale" args1(12).Value = 255 args1(13).Name = "SearchItem.ChangedChars" args1(13).Value = 2 args1(14).Name = "SearchItem.DeletedChars" args1(14).Value = 2 args1(15).Name = "SearchItem.InsertedChars" args1(15).Value = 2 args1(16).Name = "SearchItem.TransliterateFlags" args1(16).Value = 1280 args1(17).Name = "SearchItem.Command" args1(17).Value = 0 args1(18).Name = "Quiet" args1(18).Value = true dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args1()) rem ---------------------------------------------------------------------- dim args2(18) as new com.sun.star.beans.PropertyValue args2(0).Name = "SearchItem.StyleFamily" args2(0).Value = 2 args2(1).Name = "SearchItem.CellType" args2(1).Value = 0 args2(2).Name = "SearchItem.RowDirection" args2(2).Value = true args2(3).Name = "SearchItem.AllTables" args2(3).Value = false args2(4).Name = "SearchItem.Backward" args2(4).Value = false args2(5).Name = "SearchItem.Pattern" args2(5).Value = false args2(6).Name = "SearchItem.Content" args2(6).Value = false args2(7).Name = "SearchItem.AsianOptions" args2(7).Value = false args2(8).Name = "SearchItem.AlgorithmType" args2(8).Value = 0 args2(9).Name = "SearchItem.SearchFlags" args2(9).Value = 65536 args2(10).Name = "SearchItem.SearchString" args2(10).Value = "" args2(11).Name = "SearchItem.ReplaceString" args2(11).Value = "" args2(12).Name = "SearchItem.Locale" args2(12).Value = 255 args2(13).Name = "SearchItem.ChangedChars" args2(13).Value = 2 args2(14).Name = "SearchItem.DeletedChars" args2(14).Value = 2 args2(15).Name = "SearchItem.InsertedChars" args2(15).Value = 2 args2(16).Name = "SearchItem.TransliterateFlags" args2(16).Value = 1280 args2(17).Name = "SearchItem.Command" args2(17).Value = 2 args2(18).Name = "Quiet" args2(18).Value = true dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args2()) end sub
Partager