|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
添加新的空白Slide关键语句。
.Slides.Add(Pres.Slides.Count + 1, ppLayoutBlank)
- Function PptTable(Sld As Slide, Arr, FontSize, Rr, Cc, Left, Top, Width, RowHeight, ColWidth)
- Dim Shp ' As Shape
- Set Shp = Sld.Shapes.AddTable(Rr, Cc, 20, 10, 400)
- For ii = 1 To Rr
- For jj = 1 To Cc
- With Shp.Table.Cell(ii, jj).Shape.TextFrame.TextRange
- .Text = "行" & ii & ",列" & jj
- .Font.Size = FontSize
- End With
- Shp.Table.Columns.Item(jj).Width = ColWidth
- Next jj
- Shp.Table.Rows.Item(ii).Height = RowHeight
- Next ii
- Set PptTable = Shp.Table
- End Function
- ''
- Private Sub del25()
- Dim Ppt As PowerPoint.Application
- Dim Pres As Presentation
- Dim Sld As Slide
- Dim oTab As Table
- Dim Arr
- Set Ppt = New PowerPoint.Application
- Ppt.Visible = msoCTrue
- Set Pres = Ppt.Presentations.Add
- 'Set Sld = Pres.Slides.AddSlide(1, Layout:=ppLayoutTex)
- Set Sld = Pres.Slides.Add(Pres.Slides.Count + 1, ppLayoutBlank)
- Set oTab = PptTable(Sld, Arr, 10, 10, 3, 0, 0, 3, 3, 150)
- Stop
- Ppt.Quit
- End Sub
复制代码 |
|