【问题标题】:using VBA in Excel to paste into Powerpoint在 Excel 中使用 VBA 粘贴到 Powerpoint
【发布时间】:2018-09-28 01:49:31
【问题描述】:

我正在尝试从我用 Excel 中的 VBA 连接到的应用程序中捕获屏幕截图。我想截取屏幕截图并将其粘贴到 PowerPoint 中。但是,我希望将每个屏幕截图都放在一张新幻灯片上。

Dim Pptapp As New PowerPoint.Application
Set pres = Pptapp.Presentations.Add
Dim slidev As PowerPoint.Slide
'(take Screenshot, Don't need code help here)

'need help creating new slide
'need help pasting screenshot on new slide

'I want this to be able to loop through the below items

do until (the end of time)   
    Screenshot    
    new slide    
    paste on new slide     
loop

Dim Pptapp As New PowerPoint.Application
Set pres = Pptapp.Presentations.Add
Dim slidev As PowerPoint.Slide
PrintTheScreen ' function added else where 
Set slidev = pres.Slides.Add(1, PowerPoint.PpSlideLayout.ppLayoutBlank)
slidev.Select
PasteTheScreen ' function added else where 

我需要执行.Select 函数以确保幻灯片得到粘贴。

【问题讨论】:

    标签: vba excel powerpoint screenshot


    【解决方案1】:
    Dim Pptapp As New PowerPoint.Application
    Set pres = Pptapp.Presentations.Add
    Dim slidev As PowerPoint.Slide
    PrintTheScreen ' function added else where 
    Set slidev = pres.Slides.Add(1, PowerPoint.PpSlideLayout.ppLayoutBlank)
    slidev.Select
    PasteTheScreen ' function added else where 
    

    我需要执行 .select 函数以确保幻灯片得到粘贴。

    【讨论】:

      猜你喜欢
      • 2011-11-21
      • 1970-01-01
      • 1970-01-01
      • 2015-02-06
      • 1970-01-01
      • 2019-09-05
      • 2015-03-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多