Hi Sankalp,

MS word doesn't contain Macros, beyond this still you can check

here is the code

Sub Demo()
With ActiveDocument
  If .HasVBProject Then
    'Do Something
  Else
    'Do Something Else
  End If
End With
End Sub

Thanks,
Praveen Nelge