簡體   English   中英

用於具有多個選項卡的自定義 MS Access 功能區的 xml

[英]xml for custom MS Access ribbon with multiple tabs

我正在嘗試為應用程序創建帶有多個選項卡的功能區 這是我擁有的代碼,它不起作用,沒有錯誤(除了 VBA 在啟動時打開,我假設在幕后發生了一些不喜歡的事情) ,但工具欄不存在,我得到了常規的 Access 工具欄

這是一個測試工具欄,所以我正在重復按鈕等。我在訪問中編寫了一個小應用程序,它根據應用程序中所做的選擇標記 XML,我正在對其進行測試。 該應用程序適用於具有 1 個選項卡但適用於多個選項卡的工具欄 - 不走運

<?xml version="1.0" encoding="utf-8"?>
<customUI
    xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="OnLoadRibbon" loadImage="OnLoadImage">
    <ribbon startFromScratch="true">
        <tabs>
            <tab id="tabMain" label="Kroka">
                <group id="grpAppOptions" label="App Options">
                    <button id="btnLock" label="Lock Database" onAction="macLock" getImage="FGetRibbonImages" size="large"/>
                    <button id="btnPublishFile" label="Publish File" onAction="macPublishFile" getImage="FGetRibbonImages" size="large"/>
                    <button id="btnAdmin" label="Admin Settings" onAction="macAdmin" getImage="FGetRibbonImages" size="large"/>
                    <button id="btnExit" label="Exit App" onAction="macExit" getImage="FGetRibbonImages" size="large"/>
                </group>
                <group id="grpReports" label="Reports">
                    <button id="btnCloseReport" label="Close Report" onAction="macCloseReport" getImage="FGetRibbonImages" size="large"/>
                    <button id="btnExit" label="Exit App" onAction="macExit" getImage="FGetRibbonImages" size="large"/>
                </group>
            </tab>
            <tab id="tabTest" label="Kroka2">
                <group id="grpAppOptions" label="App Options">
                    <button id="btnSubmitIdea" label="Submit Idea" onAction="macCustomers" getImage="FGetRibbonImages" size="large"/>
                    <button id="btnPublishFile" label="Publish File" onAction="macPublishFile" getImage="FGetRibbonImages" size="large"/>
                    <button id="btnCustomers" label="Customers" onAction="macCustomers" getImage="FGetRibbonImages" size="large"/>
                    <button id="btnExit" label="Exit App" onAction="macExit" getImage="FGetRibbonImages" size="large"/>
                </group>
                <group id="grpReports" label="Reports">
                    <button id="btnCloseReport" label="Close Report" onAction="macCloseReport" getImage="FGetRibbonImages" size="large"/>
                    <button id="btnExit" label="Exit App" onAction="macExit" getImage="FGetRibbonImages" size="large"/>
                </group>
            </tab>
        </tabs>
    </ribbon>
</customUI>

ID 應該是唯一的。 但是它們在您的功能區 XML 標記的兩個選項卡上重復。

默認情況下,如果加載項嘗試操作 Microsoft Office 用戶界面 (UI) 並失敗,則不會顯示錯誤消息。 但是,您可以將 Microsoft Office 應用程序配置為顯示與 UI 相關的錯誤消息。 您可以使用這些消息來幫助確定不顯示自定義功能區的原因,或顯示功能區但未顯示控件的原因。 如何:顯示加載項用戶界面錯誤一文中閱讀有關此內容的更多信息。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM