Run Word VBA with msgbox via C# without user interaction -


i running macro in word document via c#, macro creates copy of document , adds couple of more attributes.

but issue that, macro has confirmation msgbox @ point of code needs user interaction.

i using code below grabbed ms's web site. question is;

is there way suppress or auto-confirm messagebox shown on run of macro?

private void runmacro(object oapp, object[] orunargs) {     oapp.gettype().invokemember("run",         system.reflection.bindingflags.default |         system.reflection.bindingflags.invokemethod,         null, oapp, orunargs); } 

since your macro, change not show confirmation msgbox.

when need macro in context confirmation msgbox shall appear, add boolean flag useconfirmationmsgbox boolean macro code, , show msgbox when flag true. then, provide 2 different entry points, 1 useconfirmationmsgbox set true, , 1 set false.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -