|
- Sub 插入圖片()
- Dim s As String
- Dim a, b As Integer
- Dim n As Integer
- a = InputBox("請輸入開始筆數 ", , 1)
- b = InputBox("請輸入結束筆數", , 1)
-
- n = ActiveDocument.InlineShapes.Count
- For i = a To b
- s = Format(i, "00")
- Selection.InlineShapes.AddPicture FileName:= _
- Word.ActiveDocument.Path & "\6111\6111" & s & ".JPG", LinkToFile:=False, SaveWithDocument:= _
- True
- ActiveDocument.InlineShapes.Item(i + n - a + 1).Select
-
- Selection.InlineShapes(1).Height = 90.2
- Selection.InlineShapes(1).Width = 73.4
- Selection.MoveDown Unit:=wdLine, Count:=1
-
- Next
- End Sub
複製代碼
|
|