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
| Dim appWord As Word.Application
Set appWord = CreateObject(Class:="Word.Application")
appWord.Visible = True
appWord.Documents.Open Filename:=pathToDocument, ReadOnly:=True
Dim DocWord As Word.Document
Set DocWord = GetObject(pathToDocument)
DocWord.Activate
j = 1
iField = 1
iQuestion = 0
iPart = 0
Dim oShape As Word.InlineShape
For Each oShape In DocWord.InlineShapes()
Dim myObj As Object
*With oShape.OLEFormat.Activate
Set myObj = oShape.OLEFormat.Object
End With
If myObj.Value = True Then
Application.Workbooks(1).Worksheets(iPart + 1).Cells(i, j).Value = 1
Else
Application.Workbooks(1).Worksheets(iPart + 1).Cells(i, j).Value = 0
End If
(...) |
Partager