View Single Post
 
Old 03-19-2014, 12:21 PM
seamus59 seamus59 is offline Windows 7 32bit Office 2007
Novice
 
Join Date: Mar 2014
Location: Cypress, Texas
Posts: 1
seamus59 is on a distinguished road
Default 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?
Reply With Quote