REM  *****  BASIC  *****

rem Code08-04.odt   bibli : Remplacer Module2
Option Explicit

Sub RemplacerStylePartout()
Dim MonDocument As Object
Dim JeCherche As Object
Dim MonCurseur  As Object
MonDocument = ThisComponent
JeCherche = MonDocument.createReplaceDescriptor
with JeCherche
  .SearchString  = "Style1"
  .ReplaceString = "Style2"
  .SearchStyles = true
end with
MonDocument.replaceAll(JeCherche)
End Sub