CanCheckIn method

CanCheckIn method

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

See also         Example         Applies to

Specifies whether a document can be checked into a Microsoft SharePoint Portal server.

Version added

2002 SR-1

Syntax

        
          boolRet = object.CanCheckIn
      

boolRet

Boolean. True (non-zero) if the document can be checked in; otherwise, False (zero).

object

Required. An expression that returns a Document object.

Remarks

You cannot check in a file that is not in a checked-out status, or is not stored in an enhanced folder on a Microsoft SharePoint Portal server.

Example

This example checks the server to see if the specified document can be checked in, and if it can, checks it back into the server.

  Sub CheckDocIn (docCheckIn As Variant)
  If Documents.Item(docCheckIn).CanCheckin = True Then
          Documents.Item(docCheckIn).CheckIn
          MsgBox docCheckIn & " has been checked in."
  Else
          MsgBox "This file cannot be checked in " & _
              "at this time. Please try again later."
  End If
  End Sub

To call the preceding CheckDocIn subroutine, use the following subroutine and replace the "http://servername/workspace/orgchart.vdx" file name with an actual file located in an enhanced folder on a Microsoft SharePoint Portal server.

  Sub DocIn()
  Call CheckDocIn _
          (docCheckIn:="http://servername/workspace/orgchart.vdx")
  End Sub