c# - How to programmatically enable the "Options..." button in the MS Word Print Setup dialog -
I am trying to display MS Word "Print Setup" dialog in a VSTO AddIn for Microsoft Word 2003. I can display in the dialog box, but the options button in the lower left corner of the dialogue is always disabled according to the screen capture.
The relevant code for what I have done so far is:
Private Zero Print SetupGLIC (commandbar button Ctrl, Riff bills cancellation default) { Dialog dialog = app. Dialog [WWDD. WDDIMLFFileprintSupup]; Object missing = type. missing; conversation. Show (missing ref); // Note that the absolute timeout}
Can anyone tell me what to do to enable the option button? I know that this can be done because we are changing a template that used to do it in VBA and the button is enabled there ...
Regards, Ben
InvokeMember
will need to be used and set the values related to the dialog that are working with you. From your documents, know that the options
attribute is available for the WdWordDialog.wdDialogFilePrintSetup dialogue
dialogue is for Office 2007, but in case hands It should be enough in
With this knowledge you can do something to set the Dialog attribute value:
Object objectDialog = (object) dialog; Object [] args = new object [1]; Argus [0] = (object) zero; // Specify the value for the option attribute, such as VBA ObjectDialog Gettype () InvokeMember ("Options", Binding Flex.SetProperty, Null, objectDialog, args);
Comments
Post a Comment