[Code]
Dim fullname As String = ActiveDocument().FullName()
Dim fname As String = ActiveDocument().Name()
Dim scc As SourceControl = DTE.SourceControl
If Not (scc Is Nothing) Then
If scc.IsItemUnderSCC(fullname) Then
If Not scc.IsItemCheckedOut(fullname) Then
Dim bCheckOut As Boolean = scc.CheckOutItem(fname)
End If
End If
End If
[/Code]
Visual Studio .NET 2003中,如上,bCheckOut返回True,但文档不能check out.