创buildmacros用于在spreadhseet上重新使用所选图像的大小50%,并在其周围绘制一个0.25pt线

我正在撰写一份报告,详细说明Excel中很多图表的顺序。 我需要将图像的大小减小50%,并在其周围绘制一条重量为0.25pt的线。

我试图logging一个macros,但是这个空白。 我已经阅读过图片格式化步骤没有logging,并被忽略。

我使用Excel 2007

Sub EditShapes() 'This Sub Edit all Shapes in all Sheets Dim sht As Worksheet Dim shp As Shape For Each sht In ActiveWorkbook.Sheets For Each shp In sht.Shapes shp.Width = shp.Width / 2 shp.Height = shp.Height / 2 shp.Line.Weight = 0.25 Next shp Next sht End Sub 

select形状

 Sub EditSelectShape() Dim shp As ShapeRange Set shp = Selection.ShapeRange shp.Width = shp.Width / 2 shp.Height = shp.Height / 2 shp.Line.Weight = 0.25 End Sub