Function IsWordProjectLocked(strDocPath As String) As Boolean
   Dim vbpProj As VBIDE.VBProject
   Dim docProj As Word.Document

   ' Open document.
   Set docProj = Documents.Open(strDocPath)

   ' Set reference to document's VBA project.
   Set vbpProj = docProj.VBProject

   ' Check Protection property of VBA project.
   If vbpProj.Protection = vbext_pp_locked Then
      IsWordProjectLocked = True
   Else
      IsWordProjectLocked = False
   End If
End Sub