Link to home
Start Free TrialLog in
Avatar of millikens
millikens

asked on

Error when calling PowerPoint from Access

At the line of code [obj_PPointApp.Visible = True] that makes Powerpoint visible, the following error is reported :

"Error Number : -2147417848 - Automation eroor - The object invoked has disconnected from its clients"

Any suggestions on how to overcome this issue.
'   Local variable definition
Dim obj_PPointApp As PowerPoint.Application
Dim obj_PPointOpen As Boolean
 
On Error GoTo OpenPPointPres_Err
    
    '     Set new occurrance of PPoint
    Set obj_PPointApp = New PowerPoint.Application
    
    '     Test for outlook already open
    obj_PPointOpen = True
    Set obj_PPointApp = GetObject(, "PowerPoint.Application")
    
    '     If applicaton not open, then create application
    If obj_PPointApp Is Nothing Then
     Set obj_PPointApp = CreateObject("PowerPoint.Application")
          obj_PPointOpen = False
    End If
    
    '     Display application and then open document
    obj_PPointApp.Visible = True
    obj_PPointApp.Presentations.Open strDocName

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Markus Fischer
Markus Fischer
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Silly MsgBox line... should be: MsgBox Err.Description
(°v°)