使用 Excel VBA 打开并签出演示文稿
Open and CheckOut a presentation using Excel VBA
我使用 PowerPoint 宏从 Intranet 服务器打开并立即签出 PowerPoint 演示文稿:
Sub Open_n_CheckOut()
Presentations.CheckOut FileName:="Link"
Presentations.Open FileName:="Link"
End Sub
我更愿意从 Excel 工作簿而不是单独的 PowerPoint 文件执行操作。
像这样的东西行得通吗:
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
您想再次入住吗,this 可能是一个起点。
一定要尝试捕获任何错误,因为我不确定这是否可行(未经测试)
我使用 PowerPoint 宏从 Intranet 服务器打开并立即签出 PowerPoint 演示文稿:
Sub Open_n_CheckOut()
Presentations.CheckOut FileName:="Link"
Presentations.Open FileName:="Link"
End Sub
我更愿意从 Excel 工作簿而不是单独的 PowerPoint 文件执行操作。
像这样的东西行得通吗:
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
您想再次入住吗,this 可能是一个起点。
一定要尝试捕获任何错误,因为我不确定这是否可行(未经测试)