在PPT中粘贴后,Excel会出现定位表问题

时间:2018-05-23 16:58:54

标签: excel excel-vba powerpoint vba

...修

我可以将嵌入式表格从Excel复制并粘贴到PPT,但是我无法定位表格。下面的代码粘贴表,但是生成" Selection.ShapeRange的运行时错误:无效的请求。"

我的经验有限,过去几周一直在努力解决这个问题,但不知道从哪里开始。

 'Copy Range from Excel
 Range("B4:E11").Copy

 'Paste Embeded File into Excel
     PPAPP.ActivePresentation.Application.CommandBars.ExecuteMso "PasteExcelTableSourceFormatting"
     PPAPP.ActivePresentation.Application.CommandBars.ReleaseFocus
    End With

'Position Table in Excel 
   With PPAPP.ActiveWindow.Selection.ShapeRange(1)
      .Name = "SummaryTable"
      .Left = 1.08 * 72
       .Top = 1.9 * 72
      .LockAspectRatio = msoFalse
      .Height = 5.11 * 72
      .Width = 11.8 * 72
        End With

0 个答案:

没有答案