Office 2003 COM-Addin made Commandbar to Word 2007 QuickToolbar

P

Peter Karlström

Hi

Is there an "easy" way to automatically place a custom made Commandbar
(originated from an Office 2003 COM Addin-project) to the Office 2007
QuickToolbar?

There are a lot of information about the customization of the user inteface
in Office 2007, but this perticular subject is hard to find info about.

This is our situation:
We have a COM Addin for Office 2002/2003 developed in VB6. In this addin we
creates a custom Toolbar with the specific functions.
When we try running it in Office 2007, this Toolbar is placed in the Addin
Tab.
Now we want this custom toolbar to be placed in the QuickToolbar. This is
easy when you do it manually, but we want to deploy this to 500+ users.
I have tried the Office Custom UI application supplied by Microsoft, but it
makes no sense on how to accomplish this.

Also, when looping thru all Commandbars and controls in Word 2007, the
QuickToolbar is not found.

Thanks in advance

Best Regards
 
J

Jialiang Ge [MSFT]

Hello Peter,

If I understand it rightly, I think you are referring to the "Quick Access
Toolbar" in the 2007 Office Fluent User Interface by the term
"QuickToolbar". Am I right? "Quick Access Toolbar" is the bar at the top of
Office UI:
http://office.microsoft.com/en-us/help/HA102481161033.aspx

When we manually add a control, say a button of our add-in in the Add-Ins
tab, to the quick access toolbar, Office basically does this operation for
us:

1. get the id/idMso of the button
Id is for custom control and idMso is for Office built-in controls.

2. save the id into a qat file.
http://support.microsoft.com/kb/926805

Take Word 2007 in Windows Vista as an example:

Suppose that we have a VB6 add-in whose controls appear in the Add-Ins tab.
When we manually add one of the add-in's control (e.g. mybutton1) to Quick
Access Toolbar, Word 2007 updates the qat file in the current user's
profile as this:

C:\Users\[username]\AppData\Local\Microsoft\Office\Word.qat

<mso:customUI xmlns:x1="WordAddIn2"
xmlns:mso="http://schemas.microsoft.com/office/2006/01/customui"><mso:ribbon
<mso:qat><mso:sharedControls><mso:control idQ="mso:FileNewDefault"
visible="false"/><mso:control idQ="mso:FileOpen"
visible="false"/><mso:control idQ="mso:FileSave"
visible="true"/><mso:control idQ="mso:FileSendAsAttachment"
visible="false"/><mso:control idQ="mso:FilePrintQuick"
visible="false"/><mso:control idQ="mso:FilePrintPreview"
visible="false"/><mso:control idQ="mso:SpellingAndGrammar"
visible="false"/><mso:control idQ="mso:Undo" visible="true"/><mso:control
idQ="mso:RedoOrRepeat" visible="true"/><mso:control
idQ="mso:TableDrawTable" visible="false"/><mso:control idQ="x1:mybutton1"
visible="true"/></mso:sharedControls></mso:qat></mso:ribbon></mso:customUI>

Notice the line:
<mso:control idQ="x1:mybutton1" visible="true"/>
This is the addition of our control to the quick access toolbar. The XML
namespace 'x1' is defined in the beginning of the XML:
xmlns:x1="WordAddIn1"

Understanding how Office saves the status of quick access toolbar, may I
suggest the following solution to you, Peter?

Step1. Manually add a control of our add-in to the quick access toolbar.
Step2. Find the qat file as illustrated above.
Step3. Find the addition in the qat file.
Step4. Write a small program to update your client's qat setting according
to the finding in Step3.

If you have any other questions or concerns, please feel free to tell me.

Have a very nice day!


Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Peter Karlström

Hello Jialiang Ge

Thanks you for the reply and information about the Quick Access Toolbar.
You are right that this is the subject, and your info has been much helpful
in searching for an answer to our issue.

How ever, some things doesn't match.
For instance, when I look in my Word.qat file after I manually added our
Addin Toolbar, the result differs from your example.
Instead of a pointer to my Addin the reference looks like this:
<mso:customUI
xmlns:msox="http://schemas.microsoft.com/office/2006/01/customui/special"

Also, the added Toolbar looks like this in my Word.qat:
<mso:control idQ="mso:GroupAddInsCustomToolbars" visible="true"/>

When working in the Customization window for the QAT, I can not find my
Addin anywhere in the left side list. The only way I found to add my Addin
Toolbar is through the Tab Addins, using the item "Customized Toolbars"
(translated from Swedish).

Somewhere along the line, it seems that my COM Addin is not exposed
correctly to Words user interface. When created it gets a name "SKB
Mallapplikation" and a Tag, but none of them is found in the QAT
customization window list.

I believe that this will work even though it's not exactly as you specified,
but it would be interesting to know the correct way.

Best Regards
--
Peter Karlström
Midrange AB
Sweden


"Jialiang Ge [MSFT]" said:
Hello Peter,

If I understand it rightly, I think you are referring to the "Quick Access
Toolbar" in the 2007 Office Fluent User Interface by the term
"QuickToolbar". Am I right? "Quick Access Toolbar" is the bar at the top of
Office UI:
http://office.microsoft.com/en-us/help/HA102481161033.aspx

When we manually add a control, say a button of our add-in in the Add-Ins
tab, to the quick access toolbar, Office basically does this operation for
us:

1. get the id/idMso of the button
Id is for custom control and idMso is for Office built-in controls.

2. save the id into a qat file.
http://support.microsoft.com/kb/926805

Take Word 2007 in Windows Vista as an example:

Suppose that we have a VB6 add-in whose controls appear in the Add-Ins tab.
When we manually add one of the add-in's control (e.g. mybutton1) to Quick
Access Toolbar, Word 2007 updates the qat file in the current user's
profile as this:

C:\Users\[username]\AppData\Local\Microsoft\Office\Word.qat

<mso:customUI xmlns:x1="WordAddIn2"
xmlns:mso="http://schemas.microsoft.com/office/2006/01/customui"><mso:ribbon
<mso:qat><mso:sharedControls><mso:control idQ="mso:FileNewDefault"
visible="false"/><mso:control idQ="mso:FileOpen"
visible="false"/><mso:control idQ="mso:FileSave"
visible="true"/><mso:control idQ="mso:FileSendAsAttachment"
visible="false"/><mso:control idQ="mso:FilePrintQuick"
visible="false"/><mso:control idQ="mso:FilePrintPreview"
visible="false"/><mso:control idQ="mso:SpellingAndGrammar"
visible="false"/><mso:control idQ="mso:Undo" visible="true"/><mso:control
idQ="mso:RedoOrRepeat" visible="true"/><mso:control
idQ="mso:TableDrawTable" visible="false"/><mso:control idQ="x1:mybutton1"
visible="true"/></mso:sharedControls></mso:qat></mso:ribbon></mso:customUI>

Notice the line:
<mso:control idQ="x1:mybutton1" visible="true"/>
This is the addition of our control to the quick access toolbar. The XML
namespace 'x1' is defined in the beginning of the XML:
xmlns:x1="WordAddIn1"

Understanding how Office saves the status of quick access toolbar, may I
suggest the following solution to you, Peter?

Step1. Manually add a control of our add-in to the quick access toolbar.
Step2. Find the qat file as illustrated above.
Step3. Find the addition in the qat file.
Step4. Write a small program to update your client's qat setting according
to the finding in Step3.

If you have any other questions or concerns, please feel free to tell me.

Have a very nice day!


Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
I

ImGeek

Customize Quick Access Toolbar -> Choose Commands From -> Add-In Tab

What do you see in this list? Is your control in the list? How did you
"manually added our Addin Toolbar" if the toolbar is not in the above list?

Peter Karlström said:
Hello Jialiang Ge

Thanks you for the reply and information about the Quick Access Toolbar.
You are right that this is the subject, and your info has been much
helpful
in searching for an answer to our issue.

How ever, some things doesn't match.
For instance, when I look in my Word.qat file after I manually added our
Addin Toolbar, the result differs from your example.
Instead of a pointer to my Addin the reference looks like this:
<mso:customUI
xmlns:msox="http://schemas.microsoft.com/office/2006/01/customui/special"

Also, the added Toolbar looks like this in my Word.qat:
<mso:control idQ="mso:GroupAddInsCustomToolbars" visible="true"/>

When working in the Customization window for the QAT, I can not find my
Addin anywhere in the left side list. The only way I found to add my Addin
Toolbar is through the Tab Addins, using the item "Customized Toolbars"
(translated from Swedish).

Somewhere along the line, it seems that my COM Addin is not exposed
correctly to Words user interface. When created it gets a name "SKB
Mallapplikation" and a Tag, but none of them is found in the QAT
customization window list.

I believe that this will work even though it's not exactly as you
specified,
but it would be interesting to know the correct way.

Best Regards
--
Peter Karlström
Midrange AB
Sweden


"Jialiang Ge [MSFT]" said:
Hello Peter,

If I understand it rightly, I think you are referring to the "Quick
Access
Toolbar" in the 2007 Office Fluent User Interface by the term
"QuickToolbar". Am I right? "Quick Access Toolbar" is the bar at the top
of
Office UI:
http://office.microsoft.com/en-us/help/HA102481161033.aspx

When we manually add a control, say a button of our add-in in the Add-Ins
tab, to the quick access toolbar, Office basically does this operation
for
us:

1. get the id/idMso of the button
Id is for custom control and idMso is for Office built-in controls.

2. save the id into a qat file.
http://support.microsoft.com/kb/926805

Take Word 2007 in Windows Vista as an example:

Suppose that we have a VB6 add-in whose controls appear in the Add-Ins
tab.
When we manually add one of the add-in's control (e.g. mybutton1) to
Quick
Access Toolbar, Word 2007 updates the qat file in the current user's
profile as this:

C:\Users\[username]\AppData\Local\Microsoft\Office\Word.qat

<mso:customUI xmlns:x1="WordAddIn2"
xmlns:mso="http://schemas.microsoft.com/office/2006/01/customui"><mso:ribbon
<mso:qat><mso:sharedControls><mso:control idQ="mso:FileNewDefault"
visible="false"/><mso:control idQ="mso:FileOpen"
visible="false"/><mso:control idQ="mso:FileSave"
visible="true"/><mso:control idQ="mso:FileSendAsAttachment"
visible="false"/><mso:control idQ="mso:FilePrintQuick"
visible="false"/><mso:control idQ="mso:FilePrintPreview"
visible="false"/><mso:control idQ="mso:SpellingAndGrammar"
visible="false"/><mso:control idQ="mso:Undo" visible="true"/><mso:control
idQ="mso:RedoOrRepeat" visible="true"/><mso:control
idQ="mso:TableDrawTable" visible="false"/><mso:control idQ="x1:mybutton1"
visible="true"/></mso:sharedControls></mso:qat></mso:ribbon></mso:customUI>

Notice the line:
<mso:control idQ="x1:mybutton1" visible="true"/>
This is the addition of our control to the quick access toolbar. The XML
namespace 'x1' is defined in the beginning of the XML:
xmlns:x1="WordAddIn1"

Understanding how Office saves the status of quick access toolbar, may I
suggest the following solution to you, Peter?

Step1. Manually add a control of our add-in to the quick access toolbar.
Step2. Find the qat file as illustrated above.
Step3. Find the addition in the qat file.
Step4. Write a small program to update your client's qat setting
according
to the finding in Step3.

If you have any other questions or concerns, please feel free to tell me.

Have a very nice day!


Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you.
Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each
follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
 
P

Peter Karlström

Hi

In the list for Customize Quick Access Toolbar-> Choose Commands From ->
Add-In tab the following is shown:
<Separator>
Customized toolbars
Menu commands
Toolbarcommands

I choose Customized toolbars to get my Toolbar in the QAT, but , as
expected, all toolbars from the Tab Addins tab follows automatically.

If I loop thru all Commandbars in Word 2003 and 2007, my toolbar has the name
SKB Mallapplikation, but this toolbar is not found in the Customize Quick
Access Toolbar window.

Best Regards
--
Peter Karlström
Midrange AB
Sweden


ImGeek said:
Customize Quick Access Toolbar -> Choose Commands From -> Add-In Tab

What do you see in this list? Is your control in the list? How did you
"manually added our Addin Toolbar" if the toolbar is not in the above list?

Peter Karlström said:
Hello Jialiang Ge

Thanks you for the reply and information about the Quick Access Toolbar.
You are right that this is the subject, and your info has been much
helpful
in searching for an answer to our issue.

How ever, some things doesn't match.
For instance, when I look in my Word.qat file after I manually added our
Addin Toolbar, the result differs from your example.
Instead of a pointer to my Addin the reference looks like this:
<mso:customUI
xmlns:msox="http://schemas.microsoft.com/office/2006/01/customui/special"

Also, the added Toolbar looks like this in my Word.qat:
<mso:control idQ="mso:GroupAddInsCustomToolbars" visible="true"/>

When working in the Customization window for the QAT, I can not find my
Addin anywhere in the left side list. The only way I found to add my Addin
Toolbar is through the Tab Addins, using the item "Customized Toolbars"
(translated from Swedish).

Somewhere along the line, it seems that my COM Addin is not exposed
correctly to Words user interface. When created it gets a name "SKB
Mallapplikation" and a Tag, but none of them is found in the QAT
customization window list.

I believe that this will work even though it's not exactly as you
specified,
but it would be interesting to know the correct way.

Best Regards
--
Peter Karlström
Midrange AB
Sweden


"Jialiang Ge [MSFT]" said:
Hello Peter,

If I understand it rightly, I think you are referring to the "Quick
Access
Toolbar" in the 2007 Office Fluent User Interface by the term
"QuickToolbar". Am I right? "Quick Access Toolbar" is the bar at the top
of
Office UI:
http://office.microsoft.com/en-us/help/HA102481161033.aspx

When we manually add a control, say a button of our add-in in the Add-Ins
tab, to the quick access toolbar, Office basically does this operation
for
us:

1. get the id/idMso of the button
Id is for custom control and idMso is for Office built-in controls.

2. save the id into a qat file.
http://support.microsoft.com/kb/926805

Take Word 2007 in Windows Vista as an example:

Suppose that we have a VB6 add-in whose controls appear in the Add-Ins
tab.
When we manually add one of the add-in's control (e.g. mybutton1) to
Quick
Access Toolbar, Word 2007 updates the qat file in the current user's
profile as this:

C:\Users\[username]\AppData\Local\Microsoft\Office\Word.qat

<mso:customUI xmlns:x1="WordAddIn2"
xmlns:mso="http://schemas.microsoft.com/office/2006/01/customui"><mso:ribbon
<mso:qat><mso:sharedControls><mso:control idQ="mso:FileNewDefault"
visible="false"/><mso:control idQ="mso:FileOpen"
visible="false"/><mso:control idQ="mso:FileSave"
visible="true"/><mso:control idQ="mso:FileSendAsAttachment"
visible="false"/><mso:control idQ="mso:FilePrintQuick"
visible="false"/><mso:control idQ="mso:FilePrintPreview"
visible="false"/><mso:control idQ="mso:SpellingAndGrammar"
visible="false"/><mso:control idQ="mso:Undo" visible="true"/><mso:control
idQ="mso:RedoOrRepeat" visible="true"/><mso:control
idQ="mso:TableDrawTable" visible="false"/><mso:control idQ="x1:mybutton1"
visible="true"/></mso:sharedControls></mso:qat></mso:ribbon></mso:customUI>

Notice the line:
<mso:control idQ="x1:mybutton1" visible="true"/>
This is the addition of our control to the quick access toolbar. The XML
namespace 'x1' is defined in the beginning of the XML:
xmlns:x1="WordAddIn1"

Understanding how Office saves the status of quick access toolbar, may I
suggest the following solution to you, Peter?

Step1. Manually add a control of our add-in to the quick access toolbar.
Step2. Find the qat file as illustrated above.
Step3. Find the addition in the qat file.
Step4. Write a small program to update your client's qat setting
according
to the finding in Step3.

If you have any other questions or concerns, please feel free to tell me.

Have a very nice day!


Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you.
Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each
follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
 
J

Jialiang Ge [MSFT]

Hello Peter,

It might be caused the fact that the add-in was not written for Word 2007
and Word 2007 has no idea about its control ID. My example in the first
reply was written to target Office 2007 with the ribbon XML:

<tabs>
<tab idMso="TabAddIns">
<group id="group1" label="group1">
<box id="box1">
<button id="mybutton1" label="button1" />
</box>
</group>
</tab>
</tabs>

In the ribbon XML, I can define the ID of the control and add these IDs to
quick access toolbar.

I'm performing researches to see if it is possible for the pre-Office 2007
add-ins to be added to Quick Access Toolbar. I will be back as soon as
possible.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 
J

Jialiang Ge [MSFT]

Hello Peter,

I get the product group's confirmation that the users can only add the
whole group to the QAT and execute it from there if the add-in was not
targeting Office 2007. If you expect to add a certain control in the add-in
to QAT, the only way is to upgrade the addin to RibbonX and assign the
control ID as shown in my last reply.

Please let me know if you have any other questions or concerns.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 
P

Peter Karlström

Hi Jialiang Gi

OK, now I get it! I have to change the creation of the Commandbar to the
iRibbon interface. I'll have a look into that.

Thank you for your support.

Best Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top