从本地计算机将演示文稿返回到服务器,并且设置本地文件为只读,以便使得其不能在本地编辑。
expression.CheckIn(SaveChanges, Comments, MakePublic)
expression 必选。该表达式返回“应用于”列表中的对象之一。
SaveChanges 可选。Boolean 类型。值为 True 时,将演示文稿保存到服务器上相应的位置。默认值为 False。
Comments 可选。Variant 类型。被签入的演示文稿的版本注释(仅在 SaveChanges 为 True 时应用)。
MakePublic 可选。Variant 类型。值为 True 时,允许用户在签入之后完成对演示文稿的发布。这会将文档提交给批准过程,它最终会导致给拥有只读权限的用户发布一种版本的演示文稿。(仅在 SaveChanges 为 True 时应用)。
若要利用 Microsoft PowerPoint 中的协作功能,演示文稿必须保存在 Microsoft SharePoint Portal Server 上。
本示例检查服务器是否可以签入指定的演示文稿;如果可以,它将关闭此演示文稿并且将其签回到服务器中。
Sub CheckInPresentation(strPresentation As String)
If Presentations(strPresentation).CanCheckIn = True Then
Presentations(strPresentation).CheckIn
MsgBox strPresentation & " has been checked in."
Else
MsgBox strPresentation & " cannot be checked in " & _
"at this time. Please try again later."
End If
End Sub
若要调用上述子程序,请使用下列子程序并用在上面说明部分中提到的服务器上的实际文件替换“http://servername/workspace/report.ppt”文件名。
Sub CheckInPresentation()
Call CheckInPresentation(strPresentation:= _
"http://servername/workspace/report.ppt")
End Sub