VB中如何关闭Powerpoint?
在PowerPoint的模块中可用Application.Quit关闭它,但把这代码放入VB的过程中就不能关闭,代码如下:
Dim PPT As powerpoint.Presentation
Set PPT = GetObject(App.Path & "\PowerPoint.PPT")
PPT.Application.Visible = True
PPT.Application.DisplayAlerts = False
PPT.Application.Quit
请高手指教!
[解决办法]
这个代码在我这里通过了
Private Sub Command1_Click() Dim pptapp As New PowerPoint.Application Dim ppt As PowerPoint.Presentation Set ppt = GetObject("C:\pp.PPT") pptapp.Visible = msoCTrue ppt.Save ppt.Close pptapp.QuitEnd Sub