Have you tried using the the view switching event?

Signature
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com
Hi,
I need to catch the event, when my InfoPath form is fully loaded
(incl. CommandBars).
My problem in detail is, that I can't change the properties of a
customized toolbar (manifest.xsf) at the OnLoad-Event of the document.
I can do using the OnContextChange-Event, but I want it to happen when
the user opens the form.
Thanks for any ideas!
The view switching event occurs for the first time after OnLoad has completed, and the view has been built. If you set a flag to identify whether you've already performed your functionality, then you can keep it from being reprocessed when the view is later switched again.

Signature
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com
Hi,
I need to catch the event, when my InfoPath form is fully loaded
(incl. CommandBars).
My problem in detail is, that I can't change the properties of a
customized toolbar (manifest.xsf) at the OnLoad-Event of the document.
I can do using the OnContextChange-Event, but I want it to happen when
the user opens the form.
Thanks for any ideas!
chrizzz - 20 Apr 2005 13:11 GMT
Thanks for your help Greg, but my customized CommandBars
(manifest.xsf) are build after the OnSwitchView-Event.
In detail, I want to set the position, begingroup, rowindex and
left-attribute right after the toolbar has loaded, because I can't set
these attributes in the "manifest.xsf".
Any ideas?
> The view switching event occurs for the first time after OnLoad has =
> completed, and the view has been built. If you set a flag to identify =
[quoted text clipped - 17 lines]
>
> Thanks for any ideas!