Reputation: 15
I open and immediately CheckOut a PowerPoint presentation from an Intranet server with a PowerPoint macro:
Sub Open_n_CheckOut()
Presentations.CheckOut FileName:="Link"
Presentations.Open FileName:="Link"
End Sub
I would prefer to do the operation from an Excel workbook instead of a separate PowerPoint file.
Upvotes: 0
Views: 259
Reputation: 75840
Would something like this work:
Sub Open_PPT()
Dim PPT As Object
Set PPT = CreateObject("PowerPoint.Application")
With PPT.Presentations
If .CanCheckOut("link") = True then
.CheckOut Filename:="link"
.Open Filename:="link"
PPT.Visible = True
Else
PPT.Quit
Msgbox "Can't checkout presentation at this moment!"
End if
End With
End Sub
Would you wish to check back in, this might be a starting point.
Surely try to catch any error, as I'm unsure if this would work (untested)
Upvotes: 1