Décocher toute les Checks box d'un doc word - VB/VBA/VBS - Programmation
Marsh Posté le 18-09-2006 à 18:15:54
bonjour, 
 
a essayer: 
 
For Each shapeLoop In ActiveDocument.InlineShapes 
    With shapeLoop 
     
        If .Type = wdInlineShapeOLEControlObject Then 
            If .OLEFormat.ClassType = "Forms.CheckBox.1" Then 
                MsgBox .OLEFormat.Object.Name 
                .OLEFormat.Object.Value = False 
            End If 
        End If 
    End With 
Next
Marsh Posté le 18-09-2006 à 16:48:39
Bonjour,
Voici mon problème : J'ai un document Word avec plein de check box. J'aimerai faire une petite macro qui décoche toute les Checks box en 1 coup. J'ai essayé le code suivant mais apparement le compilateur VBA Word n'accèpte pas le "Me.Controls" dans le code suivant :
Option Explicit
Sub esai()
Dim ctrl As Controls
For Each ctrl In Me.Controls
If TypeOf ctrl Is CheckBox Then
...
End If
Next
End Sub
Auriez vous une idée ? Merci d'avance