locked
Project Professional 2010/ Ribbon Customization/ Set focus on custom tab RRS feed

  • Question

  • Hi all,

    for the MS Project Professional 2010 Client i have created a customized ribbon tab. I'm using the SetCustomUI Method to describe the new tab in a XML-String. The new tab is structured according to a PM-Process (Initiation, Planning, Exectution, Controlling, Reporting) and groups different functions and customized views. The customized tab is located before the tab for the tasks (...insertBeforeQ=""mso:TabTask""..), so it appears right after the file background menu tab. Unfortunately after starting the client the focus is set to to the tab for tasks.

    My question now is if anybody knows how to set the focus on an customized tab in the ribbon menu?

    Thank you in advance!

    Best Regards,

    Philipp

     

    PS.: i've already posted the above question in another forum, but i guess due to the topic mismatch this didn't yield the solution:

    http://social.msdn.microsoft.com/Forums/de-DE/officede/thread/9a17daa4-e888-4f07-9a6a-08727e69fc03

    Thursday, March 17, 2011 11:05 AM

Answers

  • Dear Forum,

    After reviewing my code in another project i observed, that the misbehaviour of not focussing on my custom tab seems to be related to the events that the code handles in "ThisProject".

    When the code listens to "Project_Activate" and "Project_Open", the custom tab will be displayed behind the task-tab. If only the the procedure "Project_Activate" is handled in "ThisProject" then the focus is correctly set to the custom tab.

    Can anybody confirm this observation?

    Best regards

    Philipp

    • Marked as answer by PhilippH Tuesday, August 28, 2012 11:44 AM
    Tuesday, August 28, 2012 11:44 AM

All replies

  • The only way I can think of is to use SendKeys to send teh approbpriate keystroke shortcuts. However sendkeys is risky to use because if the user swaps to another application before Project consumes the key strokes, they are sent to teh newl activated application with obviously unpredictable results!

    Rod Gill

    The one and only Project VBA Book Rod Gill Project Management
    Friday, March 18, 2011 6:03 AM
  • Hi Rod,

    thank you for you reply.

    i've tried the option with the SendKeys-Method. But as you've mentionned this is not a very stable solution and i would like to see if there is also a kind of pure-programmatic approach?

    If there is no other way, i will try to work out something with the SendKey-Method.

    Best Regards,

    Philipp

    Friday, March 18, 2011 8:44 AM
  • Hi there,

    I am also looking for sollution for this problem.... Philipp, are you able to keep the focus on customized ribbon menu by some way?

    Friday, May 27, 2011 12:30 PM
  • you can set the active tab in the query string of the URL, setting the InitialTabId parameter. See a more descriptive article here: http://www.sharepointdevelopment.me/2010/11/set-active-ribbon-tab-from-querystring/
    Saturday, May 28, 2011 12:49 AM
  • Hey Andrei,

    on the fly i don't see if the link/ hint that you have given also applies to the Project Professional 2010 Client.

    Or does setting the attribute

    unselectable = on

    allow for keeping the focus exclusively on the indicated tab?

    Best Regards

    Philipp


    Wednesday, June 15, 2011 3:52 PM
  • Sorry, my bad, I thought you were talking about the PWA ribbon, not the Project Pro Client one.
    Wednesday, June 15, 2011 4:00 PM
  • May be this work:

    Assign Keytip in Ribbon tab XML: KeyTip="xyz"

    SendKeys ("%xyz")

    SendKeys("{ESCAPE}")  'Making Keytip invisible for the submenus

    SendKeys("{ESCAPE}")  ''Making Keytip invisible for the Toolbar Menus

    Friday, September 30, 2011 8:35 AM
  • Dear Forum,

    After reviewing my code in another project i observed, that the misbehaviour of not focussing on my custom tab seems to be related to the events that the code handles in "ThisProject".

    When the code listens to "Project_Activate" and "Project_Open", the custom tab will be displayed behind the task-tab. If only the the procedure "Project_Activate" is handled in "ThisProject" then the focus is correctly set to the custom tab.

    Can anybody confirm this observation?

    Best regards

    Philipp

    • Marked as answer by PhilippH Tuesday, August 28, 2012 11:44 AM
    Tuesday, August 28, 2012 11:44 AM