1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Dim traitementTexte As Word.Application
Set traitementTexte = New Word.Application
Set leDoc = traitementTexte.Documents.Open(ActiveWorkbook.Path & "/DOC/SYSTEM/DA.doc")
leDoc.Content.Find.Execute findtext:="<BALISE1>", ReplaceWith:="" & "" & Feuil3.Range("A1").Value, Replace:=wdReplaceAll
leDoc.Content.Find.Execute findtext:="<BALISE2>", ReplaceWith:="" & "" & UserForm8.Label35.Caption, Replace:=wdReplaceAll
leDoc.Content.Find.Execute findtext:="<BALISE3>", ReplaceWith:="" & "" & UserForm8.ComboBox1.Value, Replace:=wdReplaceAll
leDoc.Content.Find.Execute findtext:="<BALISE4>", ReplaceWith:="" & "" & Feuil3.Range("A6").Value, Replace:=wdReplaceAll
leDoc.Content.Find.Execute findtext:="<BALISE5>", ReplaceWith:="" & "" & Feuil3.Range("A7").Value, Replace:=wdReplaceAll
leDoc.Content.Find.Execute findtext:="<BALISE6>", ReplaceWith:="" & "" & Feuil3.Range("A1").Value, Replace:=wdReplaceAll
leDoc.Content.Find.Execute findtext:="<BALISE7>", ReplaceWith:="" & "" & LCase(MyStr), Replace:=wdReplaceAll
leDoc.Content.Find.Execute findtext:="<BALISE8>", ReplaceWith:="" & "" & UserForm8.TextBox4.Value, Replace:=wdReplaceAll
leDoc.Content.Find.Execute findtext:="<BALISE9>", ReplaceWith:="" & "" & UserForm8.TextBox2.Value, Replace:=wdReplaceAll
leDoc.Content.Find.Execute findtext:="<BALISE11>", ReplaceWith:="" & "" & Feuil3.Range("C2").Value, Replace:=wdReplaceAll
'------------------------------------------------------>
'imprimer
'------------------------------------------------------>
leDoc.SaveAs (ActiveWorkbook.Path & "/DOC/" & UserForm8.Label35.Caption & " " & "BE.doc")
leDoc.Close |
Partager