PDA

View Full Version : Custom Tab based on Network UserName



gmaxey
07-22-2010, 05:37 AM
I am toying with idea of converting a bunch of Word2003 templates (with toolbars) into a single Word2007 template addin. The various 2003 templates are loaded in a user's startup folder based on the username and there role in the organization. For example all of the front office staff have a set of toolbars, each pratictioner has a custom toolbar, and there are toolbars common to all users.

I pretty much know how to create and populate a Office2007 UI dynamic menu based on username. What I am looking into is the possibility of having a single template addin with a custom tab and building that entire tab based on username and role.

For example. The custom tab would have a common group and then say a front office group if the user was part of a defined front office group. If one of the pratictioners logs in the tab would have the common group and his or her custom group.

As I say, I think I know how to get the custom XML for a single dynamic menu, but how would I go about getting the custom XML for an entire tab? Can it be done?

Open to any suggestions. Thanks.

Bob Phillips
07-23-2010, 03:51 AM
Greg,

Would you just GetVisible callback for each of the variable groups, and then just make them visible or not in the OnLoad procedure after you have checked the user status?

gmaxey
07-23-2010, 04:12 AM
Yes and I am sorry. That is exactly what I have demo'd in a proof of concept and neglected to mention. I can make that work.

There are about 12 practitioners that come and go periodically. Rather than have 12 custom groups and associated XML, I was hoping to find a way to have one custom group that I could build on the fly once username was determined.

I am not certain at this point what the range of differences are between the various practitioners. I may be able to use one group with a getLabel and a couple of dynamic menus.

Too bad there isn't a top level getContent callback that can be used to create an entire tab.

Thanks again.

Bob Phillips
07-23-2010, 04:15 AM
Greg,

What is the problem with even 100 groups that you set as visible or not depending upon the user. Sure, it is a lot of XML, but it is a once-off setup, and you rarely touch it thereafter.

I would certainly go that route, don't see any issues with it.

gmaxey
07-23-2010, 03:08 PM
Yes that is the route I will likely take. I was just wondering if there was a way to get content for an entire Tab or even entire Ribbon level.

Thanks for your time and reply.