I am trying to export 2 views to separate .MHT files. I can export the first view, then I call 'View.SwitchView' and in the 'OnSwitchView' event I can then export the second view, but I can't seem to then switch back to the main view, I get the following error:
'InfoPath cannot execute any view-related object model calls. The view is not ready.'
Is there a way I can export a view without first call 'SwitchView'? If not, is there a way to call 'SwitchView' several times in a row without getting this error?
Thanks!
p.s. - I am doing this in a button OnClick event