向功能区添加分隔符

Add a Separator to a Ribbon

我正在尝试向我的 MS Word 2010 功能区添加分隔符,但我尝试的任何操作都没有显示出来。我的 XML 代码没有从 Word 中生成错误消息。 Word 只是忽略了我的努力。这是我的代码:

    <mso:cmd app="Word" dt="1" />
    <mso:customUI xmlns:x1="http://schemas.microsoft.com/office/2009/07/customui/macro" xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui">
        <mso:ribbon>
            <mso:tabs>
                <mso:tab id="mso_c1.548D7E1" label="Documents" insertBeforeQ="mso:TabHome">
                    <mso:group id="mso_c1.8A0B6A" label="Series 1" imageMso="FormulaMoreFunctionsMenu" autoScale="true">
                        <mso:button idQ="x1:Open_00_0_987C31" label="00" imageMso="BlackAndWhiteBlackWithWhiteFill" onAction="Open_00" visible="true"/>
                        <mso:button idQ="x1:Open_01_1_987C31" label="01" imageMso="AppointmentColor0" onAction="Open_01" visible="true"/>
                        <mso:button idQ="x1:Open_02_2_987C31" label="02" imageMso="AppointmentColor1" onAction="Open_02" visible="true"/>
                        <mso:button idQ="x1:Open_03_3_987C31" label="03" imageMso="AppointmentColor2" onAction="Open_03" visible="true"/>
                        <mso:button idQ="x1:Open_04_4_987C31" label="04" imageMso="AppointmentColor3" onAction="Open_04" visible="true"/>
                        <mso:button idQ="x1:Open_05_5_987C31" label="05" imageMso="AppointmentColor4" onAction="Open_05" visible="true"/>
                        <mso:button idQ="x1:Open_06_6_987C31" label="06" imageMso="AppointmentColor5" onAction="Open_06" visible="true"/>
                        <mso:button idQ="x1:Open_07_7_987C31" label="07" imageMso="AppointmentColor6" onAction="Open_07" visible="true"/>
                        <mso:button idQ="x1:Open_08_8_987C31" label="08" imageMso="AppointmentColor7" onAction="Open_08" visible="true"/>
                        <mso:button idQ="x1:Open_09_9_987C31" label="09" imageMso="AppointmentColor8" onAction="Open_09" visible="true"/>
                        <mso:button idQ="x1:Open_10_10_987C31" label="10" imageMso="AppointmentColor9" onAction="Open_10" visible="true"/>
                        <mso:button idQ="x1:Open_11_11_987C31" label="11" imageMso="AppointmentColor10" onAction="Open_11" visible="true"/>
                        <mso:button idQ="x1:Open_12_12_987C31" label="12" imageMso="AppointmentBusy" onAction="Open_12" visible="true"/>
                        <mso:button idQ="x1:Open_13_13_987C31" label="13" imageMso="AppointmentColor0" onAction="Open_13" visible="true"/>
                        <mso:button idQ="x1:Open_14_14_987C31" label="14" imageMso="AppointmentColor1" onAction="Open_14" visible="true"/>
                        <mso:button idQ="x1:Open_15_15_987C31" label="15" imageMso="AppointmentColor2" onAction="Open_15" visible="true"/>
                        <mso:button idQ="x1:Open_16_16_987C31" label="16" imageMso="AppointmentColor3" onAction="Open_16" visible="true"/>
                        <mso:button idQ="x1:Open_17_17_987C31" label="17" imageMso="AppointmentColor4" onAction="Open_17" visible="true"/>
                        <mso:button idQ="x1:Open_18_18_987C31" label="18" imageMso="AppointmentColor5" onAction="Open_18" visible="true"/>
                        <separator visible="true"/>
                        <mso:button idQ="x1:Open_Notes_19_987C31" label="Notes" imageMso="BlackAndWhiteAutomatic" onAction="Open_Notes" visible="true"/>
                        <mso:button idQ="x1:Open_Home_20_987C31" label="Home" imageMso="Folder" onAction="Open_IAGFFA_Home" visible="true"/>
                    </mso:group>
                </mso:tab>
            </mso:tabs>
    </mso:ribbon>
    </mso:customUI>

您可以看到我试图在靠近块末尾的几行处插入分隔符。

我已经尝试了十几个 Google 搜索来引导我完成这个过程,我什至还尝试了图书馆的几本书,但是我很难完成这个非常简单的添加.让 Microsoft 让添加分隔符变得如此困难。

如果所有控件都使用命名空间声明,您也需要 use/declare 它。

 <mso:separator visible="true"/> 

在以下系列文章中阅读有关功能区 UI(又名 Fluent UI)控件的更多信息: