How to check macro on word 2007 is enabled or not by c# code
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Praveen N104 reputationPosted Dec 22, 2013, 7:22 PM EST
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