vba VBA宏复制范围和粘贴范围到PPT作为图片

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18317027/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-11 22:49:57  来源:igfitidea点击:

VBA Macro to Copy Range and Paste range to PPT as Picture

excelvbaexcel-vbapowerpointpowerpoint-vba

提问by Mowgli

Need help to copy range of cells from excel sheet1 to PowerPoint file and paste it as Picture and make that picture fit inside the slide automatically.

需要帮助将单元格范围从 excel sheet1 复制到 PowerPoint 文件并将其粘贴为图片并使该图片自动适合幻灯片。

I currently use Snagit software to take screenshot of the sheet and use send to powerpoint but it take lots of time.

我目前使用 Snagit 软件截取工作表的屏幕截图并使用发送到 powerpoint,但这需要很多时间。

Any feedback would be nice to automate this process

任何反馈都会很好地自动化这个过程

回答by Mr.Monshaw

something like this

像这样的东西

Sub BetterPicturePaste()

    '...other stuff...

    Windows(1).Sheets(1).Range("myrange").Copy
    Windows(2).View.PasteSpecial DataType:=ppPasteEnhancedMetafile

End Sub