Disabling undo button in Word.
I am currently programming for word in Java, and am attempting to disable the undo button within the word application. I've been able to find some example VBA code on how to do this
CommandBars("File").Controls("Properties").Enabled = False ‘or True to enable
which, with a few changes should theoretically do for the same process in java using the COM api, but so far have been unable to do so.
I can retrieve the Command Bars Object and from it the "Standard" Command bar - though I don't even know if its the right one, and I"m struggling to find any decent reference materials - but from there whenever I try to access a control I get a COM error saying invalid parameter.
application.getCommandBars().getItem(new Variant("Standard")).getControls().getItem(new Variant("Undo")).setEnabled(new VariantBool(false));
Above is what I currently have.
Has anyone else attempted something like this in java, and if so how? Any help would be greatly appreciated.
Thanks in advance