您好,欢迎访问三七文档
当前位置:首页 > 临时分类 > ppt-调整图片尺寸位置
1、视图宏2、输入ImageEdite创建3、改变尺寸SubImageEdite()Fori=1ToActivePresentation.Slides.CountActivePresentation.Slides(i).SelectWithActiveWindow.Selection.SlideRangeForj=1ToActiveWindow.Selection.SlideRange.Shapes.CountIfActiveWindow.Selection.SlideRange.Shapes(j).Type=13Then'如果该对象为图片ActiveWindow.Selection.SlideRange.Shapes(j).Top=43'设置图片的上面的边距ActiveWindow.Selection.SlideRange.Shapes(j).Left=48'设置图片的左边的边距ActiveWindow.Selection.SlideRange.Shapes(j).LockAspectRatio=msoFalse'取消原始图片的长宽比'r=ActiveWindow.Selection.SlideRange.Shapes(j).Height/ActiveWindow.Selection.SlideRange.Shapes(j).Width'保存原始图片的长宽比ActiveWindow.Selection.SlideRange.Shapes(j).Height=367'设置图片的新高度值'ActiveWindow.Selection.SlideRange.Shapes(j).Width=ActiveWindow.Selection.SlideRange.Shapes(j).Height/r'设置图片的新宽度值,等比放大或缩小ActiveWindow.Selection.SlideRange.Shapes(j).Width=624EndIfNextjEndWithNextEndSub-------------------原来的Fori=1ToActivePresentation.Slides.CountActivePresentation.Slides(i).SelectWithActiveWindow.Selection.SlideRangeForj=1ToActiveWindow.Selection.SlideRange.Shapes.CountIfActiveWindow.Selection.SlideRange.Shapes(j).Type=13Then'如果该对象为图片ActiveWindow.Selection.SlideRange.Shapes(j).Top=50'设置图片的上面的边距ActiveWindow.Selection.SlideRange.Shapes(j).Left=50'设置图片的左边的边距r=ActiveWindow.Selection.SlideRange.Shapes(j).Height/ActiveWindow.Selection.SlideRange.Shapes(j).Width'保存原始图片的长宽比ActiveWindow.Selection.SlideRange.Shapes(j).Height=200'设置图片的新高度值ActiveWindow.Selection.SlideRange.Shapes(j).Width=ActiveWindow.Selection.SlideRange.Shapes(j).Height/r'设置图片的新宽度值,等比放大或缩小EndIfNextjEndWithNext
本文标题:ppt-调整图片尺寸位置
链接地址:https://www.777doc.com/doc-4822441 .html