- 帖子
- 5923
- 主題
- 13
- 精華
- 1
- 積分
- 5986
- 點名
- 0
- 作業系統
- win10
- 軟體版本
- Office 2010
- 閱讀權限
- 150
- 性別
- 男
- 來自
- 台灣基隆
- 註冊時間
- 2010-5-1
- 最後登錄
- 2022-1-23
        
|
8#
發表於 2012-9-27 15:38
| 只看該作者
回復 7# whirlwind963
可參考 這裡 http://forum.twbts.com/viewthread.php?tid=687
- Sub Macro1()
- Dim E As Shape, j, NN
- Sheets("Sheet1").Select
- For Each E In ActiveSheet.Shapes
- If E.Type = 13 Then E.Delete
- 'If InStr(E.Name, "Picture") Then E.Delete '這也可以
- Next
- j = 2
- While Cells(j, "C") <> ""
- NN = Cells(j, "C")
- Cells(j, "D").Select
- ActiveSheet.Pictures.Insert( _
- NN). _
- Select
- Selection.ShapeRange.LockAspectRatio = msoTrue
- Selection.ShapeRange.Height = 100#
- Selection.ShapeRange.Width = 100#
- Selection.ShapeRange.Rotation = 0#
- With Selection
- .Placement = xlMoveAndSize
- .PrintObject = True
- End With
- j = j + 1
- Wend
- Range("C2").Select
- End Sub
複製代碼 |
|