|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
本帖最后由 duquancai 于 2016-11-17 18:37 编辑
- Sub shishi()
- Dim x%, y%, i%, n%, m%
- Application.ScreenUpdating = False
- For i = 1 To ActiveDocument.ActiveWindow.ActivePane.Pages.Count
- With Selection.GoTo(1, 1, i).Bookmarks("\page").Range
- If .InlineShapes.Count + .ShapeRange.Count > 0 Then
- If .InlineShapes.Count >= 1 Then
- For x = 1 To .InlineShapes.Count
- n = n + 1
- MsgBox "第" & n & "张嵌入式图片在第" & i & "页"
- Next
- End If
- If .ShapeRange.Count >= 1 Then
- For y = 1 To .ShapeRange.Count
- m = m + 1
- MsgBox "第" & m & "张浮动式图片在第" & i & "页"
- Next
- End If
- End If
- End With
- Next
- Application.ScreenUpdating = True
- End Sub
复制代码 |
|