Cannot select my custom tab when new document is opened
I have created a template for a user form with a custom menu in the 'Add-Ins' ribbon tab. The user starts by double clicking the '.dotm', MS Word uses the template to create Document1 and code selects the first field. So-far, so-good. But, I would like the Add-Ins Tab to be selected when that happens.
I have tried SendKeys and the SwitchTab (accessability) routine to no avail. Through debugging, I have noticed that when Word first creates Document1, the Ribbon doesn't have 'Add-Ins', 'Design' or 'Layout' tabs until my code has COMPLETED the 'Document_New' event, then those three tabs appear. So I think that is why neither method works, because the tabs aren't there.
Does anyone have an answer or suggestion?
|