現在就用 Excel 巨集來清除物件:
按下 alt+F11 開啟巨集,然後在左上角This WorkBook用滑鼠點兩下,出現程式碼視窗後,把程式碼貼上:
Sub DeleteTextShape()
Dim sp As Shape
For Each sp In ActiveWorkbook.ActiveSheet.Shapes
If sp.Name Like "Text Box *" Then sp.Delete
Next sp
End Sub
Sub DeletePictureShape()
Dim sp As Shape
For Each sp In ActiveWorkbook.ActiveSheet.Shapes
If sp.Name Like "Picture *" Then sp.Delete
Next sp
End Sub
之後切回到 Excel 中,按下 alt+F8 來執行程式碼,選擇 "ThisWorkBook.DeleteTextShape" 然後選擇 "執行" ,稍等一小段時間,就可以把文字物件清除掉;
若還是覺得卡卡的,可以再按下 alt+F8 選擇 "ThisWorkBook.DeletePictureShape" 然後選擇 "執行" 來刪除圖片物件 (會清除所有圖片,要注意)。
刪完後存檔,下次開啟會很多了!
沒有留言:
張貼留言