|
这是我的全部代码:
Sub xx()
Dim t
t = Timer
Dim pptapp As PowerPoint.Application
Dim prt As PowerPoint.Presentation
Dim sld1 As PowerPoint.Slide
Set pptapp = New PowerPoint.Application
Set prt = pptapp.Presentations.Add(msoTrue)
pptapp.Visible = msoTrue
Set sld1 = prt.Slides.Add(1, ppLayoutBlank)
Sheets(1).ChartObjects(1).Copy
sld1.Shapes.Paste
With sld1.Shapes(1)
.Left = 10
.Top = 10
.ScaleWidth 1.8, msoFalse, msoScaleFromTopLeft
.ScaleHeight 1.8, msoFalse, msoScaleFromTopLeft
End With
Dim shp1
Set shp1 = sld1.Shapes.AddTextbox(msoTextOrientationHorizontal, 300, 300, 200, 50)
shp1.TextFrame.TextRange.Text = Range("A3")
shp1.TextFrame.TextRange.Font.Size = 28
shp1.TextFrame.TextRange.Font.Name = "微软雅黑"
MsgBox Timer - t
End Sub |
|