我想从excel复制并粘贴到PowerPoint,并保持excel表格式。该表还应复制到Powerpoint中具有特定字体大小的特定位置。
我发现了如何复制为图片。但是问题是您以后无法修改图片并添加一个句子左右。
我使用Microsoft 2007;(.。我认为这是问题的一部分。我只能将其粘贴为“ OLEObject”。
Dim oPPT As PowerPoint.Application
Dim ppTextbox As PowerPoint.Shape
Dim ppPlaceholder As PowerPoint.PlaceholderFormat
Dim FirstSlide As PowerPoint.Slide
Dim oSlide As PowerPoint.Slide
Dim LastSlide As PowerPoint.Slide
'Open PowerPoint
Set oPPT = New PowerPoint.Application
oPPT.Visible = True
oPPT.Presentations.Open
"P:\Automotive\JDIE_Automotive\For Sales\QuoteLayout\automaticallygenerated.pptm"
'copy and paste from excel to PowerPoint
Worksheets("SalesOutput1").Range("A1:I6").Copy
oSlide.Shapes.PasteSpecial ppPasteOLEObject
With oSlide.Shapes(oSlide.Shapes.Count)
.LockAspectRatio = msoTrue
.Left = 43
.Top = 470
.Height = 80
End With
答案 0 :(得分:0)
对不起,但是OLE对象必须在源程序中而不是在主机中格式化。您必须在Excel中进行更改,然后粘贴到PowerPoint。