Avatar of Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Flag for Zambia asked on

Ribbons design in Ms Access 2016

Just for consultation purpose , I want to maintain the in-belt Ribbon preview button and at the same time adding my excel export other programs export function in my ms access app.kindly see whether this is okay with you.

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon> 
<tabs>
            <tab id="grpRprt1" label="Export Reports">
                
                <group id="grpRprt3" label="Export">
                    <control idMso="ExportExcel"  visible="true"  size="large" /> 
                    <separator id="sprtrRpt1" />
                    <control idMso="ExportWord" visible="true"  size="large" />
                    <separator id="sprtrRpt2" />
                    <control idMso="ExportTextFile"  visible="true" size="large" />
                    <separator id="sprtrRpt3" />
                    <button idMso="FileSaveAsPdfOrXps" visible="true" size="large" />
                </group>
            </tab>
        </tabs>
    </ribbon>
</customUI>

Open in new window


I have also noticed that the export is using 97 to 2003 is it possible to change it so that it starts from 2003 to 2016?

Regards

Chris
Microsoft AccessVBA

Avatar of undefined
Last Comment
John Tsioumpris

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Scott McDaniel (EE MVE )

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
John Tsioumpris

You would better with a custom function assigned to the Ribbon button
 <button id="ExportToXLSX"  visible="true" size="large" imagemso = "ChartShowData"
onAction="exportToXLSX" />

Open in new window

and the function
Public Function exportToXLSX(ctl As IRibbonControl)
Dim curPath As String
curPath = CurrentProject.Path & "\YourExcel"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "YourTable", curpath, True

End Function

Open in new window

Last but not least you need a reference to Microsoft Office 16 Object Library (change 16 to your version)
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy