Heike Posted September 5, 2003 Posted September 5, 2003 I've following problem: I have a COM AddIn for Word, developped in VB .NET. Within this AddIn some documents can be opened. To those documents the menu "Save as" (in Word) shall be disabled. For the other documents it should be enabled. This is how I do it: Dim objWord As Word.Application objWord = CType(objWordInstance, Word.Application) objWord.CustomizationContext = objWord.ActiveDocument objWord.CommandBars(cstrMenuBar).Controls(cstrMenuDatei).controls(cstrMenuSaveAs).enabled = False That's working fine. Now I want to save and close this document. (It's saved automatically when the user closes it; therefore I'm using the DocumentBeforeClose event). During this procedure I am sometimes asked, if I want to save the document. Just in the beginning of my DocumentBeforeClose I set the enabled-property to true again. Any idea what may be wrong? Quote
Recommended Posts