I have tried to use the Application object's Quit method to close InfoPath using C#, but I get a "System.Security.SecurityException"
Specifically, when I find that an unauthorized user is attempting to open the form, I use the following syntax in an attempt to close the local copy of InfoPath:
// thisApplication is an instance of the Application object
thisApplication.Quit(false);
Does anyone have an idea of what I might be doing wrong?
Is there another approach?
Thanks in advance