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
|
Private Sub ValiderQuestionnaire_Click()
Rep = MsgBox("Êtes-vous sur de vouloir valider vos choix ?" & vbCr & "Une fois validé, vous ne pourrez plus revenir en arrière.", vbYesNo + vbQuestion)
If Rep = vbYes Then
Dim WordApp As Word.Application
Dim WordDoc As Word.Document
Set WordApp = CreateObject("Word.Application")
WordApp.Visible = True
Set WordDoc = WordApp.Documents.Open(ThisDocument.Path & "\Insertion de textes\FichFinal\FichierFinalev1.0.docx")
'Si la case ATA a été cochée, nous allons afficher remplir les information nécessaires
'/---------------------------------------------------ATA---------------------------------------------------/
If ATA = vbYes Then
WordDoc.Content.GoTo What:=wdGoToBookmark, Name:="INFO_ATA"
WordDoc.Content.InsertFile FileName:=ThisDocument.Path & "\Insertion de textes\ATA\Informations ATA.docx", Range:="", _
ConfirmConversions:=False, Link:=False, Attachment:=False
WordDoc.Content.Find.ClearFormatting
With WordDoc.Content.Find
.Text = "[SIGNET INFO_ATA]"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
WordDoc.Content.GoTo What:=wdGoToBookmark, Name:="ANNEXE_ATA"
WordDoc.Content.Find.ClearFormatting
With WordDoc.Content.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
WordDoc.Content.InsertFile FileName:=ThisDocument.Path & "\Insertion de textes\ATA\Annexe ATA.docx", Range:="", _
ConfirmConversions:=False, Link:=False, Attachment:=False
End If
End Sub |
Partager