MS Office功能区:两个splitButton菜单项而不是一个 [英] MS Office ribbon: Two splitButton menu items instead of one

查看:129
本文介绍了MS Office功能区:两个splitButton菜单项而不是一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


 


<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" loadImage="GetImage" onLoad="OnRibbonLoad">
 <ribbon>
 <tabs>
  <tab idMso="TabHome">
  <group id="MyAppGroup" label="MyApp">
<splitButton id="SaveSplitButton" size="large" getEnabled="GetSaveButtonEnabled"> <menu id="SaveMenu" label="Save" itemSize="normal"> <button id="SaveMenuButton" image="save.png" label="Save to MyApp" onAction="SaveCommand" screentip="Saves the document" />
<button id="SaveAsMenuButton" label="Save to MyApp As" onAction="SaveAsCommand" screentip="Saves the document under a new name" getEnabled="GetSaveAsButtonEnabled"/>
</menu> </splitButton> </group> </tab> </tabs>

推荐答案

你好,¥b $ b

从您的角度来看,您似乎没有使用VSTO技术。该论坛主要针对VSTO技术,该技术适用于一种应用而非所有办公应用。你可以参考这个论坛的

请先阅读
以了解有关此技术的更多信息。这个问题的最佳位置是office.developer.com.add_ins新闻组:

http://www.microsoft.com/office/community/en-us/default.mspx?dg= microsoft.public.office.developer.com.add_ins&安培;朗= EN&安培; CR = US


$
但是,我已经通过创建VSTO Word 2007 加载项进行了测试,并且一切正常。 项目" ;保存到MyApp"在Papirus 组的Home 标签中不会加倍。为了测试,我使用上面的XML代码进行了轻微的更改。
xml 代码 我这样使用,
$


       < group id =" ; MyAppGroup1" label =" MyApp">

          < splitButton id =" SaveSplitButton1"大小= QUOT;大" >

            < menu id =" SaveMenu1"标签= [储存" itemSize =" normal">

              < button id =" SaveMenuButton1"图像= QUOT; save.png" label ="保存到MyApp"的OnAction = QUOT; SaveCommand" screentip ="在MyApp.net上保存文档" />&
              < button id =" SaveAsMenuButton1" label =""保存到MyApp As";的OnAction = QUOT; SaveAsCommand" screentip ="以新名称保存papirus.net上的文件" />

            < / menu>

          < / splitButton>

        < / group>



这里,我建议你在回调中设置一些断点,并进行调试。



如果您对此有任何疑虑,请随时跟进。



祝您好运,

Bessie


Hello,

From what you side, it seems that you are not working with VSTO technology. This forum is mainly targeted at VSTO technology which is for one application not all office applications. You could refer to this forum's PLEASE READ FIRST to know more about this technology. The best place for this issue would be office.developer.com.add_ins newsgroup:
http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.office.developer.com.add_ins&lang=en&cr=US.

However, I have made a test by creating VSTO Word 2007 Add-in, and everything work fine. The item "Save to MyApp" is not doubled in Papirus group of Home tab. For test, I made a slight change with XML code above. The xml code I used like this,

       <group id="MyAppGroup1" label="MyApp">
          <splitButton id="SaveSplitButton1" size="large" >
            <menu id="SaveMenu1" label="Save" itemSize="normal">
              <button id="SaveMenuButton1" image="save.png" label="Save to MyApp" onAction="SaveCommand" screentip="Saves the document on MyApp.net" />
              <button id="SaveAsMenuButton1" label="Save to MyApp As" onAction="SaveAsCommand" screentip="Saves the document on papirus.net under a new name"/>
            </menu>
          </splitButton>
        </group>

Here, I suggest you set some breakpoints into the callbacks, and debug it.

If you have any concern for this, please feel free to follow up.

Best regards,
Bessie


这篇关于MS Office功能区:两个splitButton菜单项而不是一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆