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
| Sub FigureInfo()
Dim iShapeCount As Integer
Dim iILShapeCount As Integer
Dim DocThis As Document
Dim J As Integer
Dim sTemp As String
Set DocThis = ActiveDocument
Documents.Add
iILShapeCount = DocThis.InlineShapes.Count
If iILShapeCount > 0 Then
Selection.TypeText Text:="Inline Shapes"
Selection.TypeParagraph
End If
For J = 1 To iILShapeCount
Selection.TypeText Text:="Shape " & J
Selection.TypeParagraph
sTemp = " Height (points): "
sTemp = sTemp & DocThis.InlineShapes(J).Height
Selection.TypeText Text:=sTemp
Selection.TypeParagraph
sTemp = " Width (points): "
sTemp = sTemp & DocThis.InlineShapes(J).Width
Selection.TypeText Text:=sTemp
Selection.TypeParagraph
sTemp = " Height (pixels): "
sTemp = sTemp & PointsToPixels(DocThis.InlineShapes(J).Height, True)
Selection.TypeText Text:=sTemp
Selection.TypeParagraph
sTemp = " Width (pixels): "
sTemp = sTemp & PointsToPixels(DocThis.InlineShapes(J).Width, False)
Selection.TypeText Text:=sTemp
Selection.TypeParagraph
Selection.TypeParagraph
' Pour modifier les images
DocThis.InlineShapes(J).Activate
Next J
End Sub |
Partager