1
上午在使用Excel VBA中。這裏功率點自動化工作是代碼Excel VBA中多量程到PowerPoint
'List of PPT Slides to Paste to
MySlideArray = Array(2, 3, 4, 5, 6)
'List of Excel Ranges to Copy from
MyRangeArray = Array(Sheet1.Range("$A$6:$I$16"),
Sheet1.Range("$A$6:$I$8,$A$17:$I$33"), _
Sheet1.Range("$A$6:$I$16"), Sheet1.Range("$A$6:$I$16"),
Sheet1.Range("$A$6:$I$16"))
'Loop through Array data
For x = LBound(MySlideArray) To UBound(MySlideArray)
'Copy Excel Range
MyRangeArray(x).Copy
'Paste to PowerPoint and position
On Error Resume Next
Set shp =
myPresentation.Slides(MySlideArray(x)).Shapes.PasteSpecial(DataType:=2)
'Excel 2007-2010
Set shp = PowerPointApp.ActiveWindow.Selection.ShapeRange 'Excel 2013
On Error GoTo 0
的代碼工作,唯一的問題是代碼
Sheet1.Range("$A$6:$I$8,$A$17:$I$33")
不不排除所述單元格,只需包含所有內容
謝謝你這麼多 –
如何指定每個slide.How的大小做我格式化每個幻燈片? –