My Assistant
![]() ![]() |
|
|
Nov 21 2011, 10:55 AM
Post
#1
|
|
|
UtterAccess VIP Posts: 1,402 From: Northern Virginia |
From the "nothing's ever easy department."
I am trying to create an .accde file which I rename to .accdr to give to users. My custom ribbon (which works great with the .accdb or .accde) hides the "export to word" button when running in runtime. WHY?!? Why are they doing this to us? Is there a reason why? and more im (IMG:style_emoticons/default/pullhair.gif) portantly, is there a workaround. I really need the "export to word" button to be there. thanks, Rob |
|
|
|
Nov 21 2011, 10:58 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 7,590 From: South coast, England |
Hi Rob
Add the line visible="true" to the comand button line in your XML. hth Edit: Discussion about it in this thread. This post has been edited by pere_de_chipstick: Nov 21 2011, 11:03 AM |
|
|
|
Nov 21 2011, 01:15 PM
Post
#3
|
|
|
UtterAccess VIP Posts: 1,402 From: Northern Virginia |
Thanks again, Bernie.
My XML line looks like THIS now: <control idMso="ExportWord" label="Export to Word" enabled="true" visible = "true"/> instead of this: <control idMso="ExportWord" label="Export to Word" enabled="true"/> Works great! Thanks! Rob |
|
|
|
Nov 21 2011, 01:48 PM
Post
#4
|
|
|
UtterAccess VIP Posts: 7,590 From: South coast, England |
(IMG:style_emoticons/default/yw.gif)
FWIW, I use the following ribbon XML for all my databases' reports: CODE <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="onRibbonLoad6"> <ribbon startFromScratch="true"> <tabs> <tab id="grpRprt1" label="File"> <group id="grpPrint" label="Print" visible="true"> <button id="PrntRpt" size="large" label="Print" imageMso="PrintDialogAccess" onAction="=PrintDialog()"/> </group> <group id="grpClgrpRprt2" label="Close"> <button id="PPrClose" label="Close" imageMso="PrintPreviewClose" size="large" onAction="OnCloseReport"/> </group> <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> The custom command for the print dialog box allows the db to determine if the report has actually been printed or not (via the intPrinted global variable) - or at least sent to the print queue. While the custom close command calls a DoEvents command that allows the report ribbon to be replaced quickly by the form ribbon. CODE Public Function PrintDialog() On Error GoTo err_PrintDialog 'Opens windows print dialog box, 'If printed (ie NOT Cancelled) sets global variable intPrinted to -1 and closes report DoCmd.RunCommand acCmdPrint intPrinted = -1 DoCmd.Close acReport, Screen.ActiveReport.Name exit_PrintDialog: Exit Function err_PrintDialog: Resume exit_PrintDialog End Function Sub OnCloseReport(ctrl As IRibbonControl) On Error GoTo err_proc Application.Echo False DoCmd.Close acReport, Screen.ActiveReport.Name DoEvents exit_proc: Application.Echo True Exit Sub err_proc: MsgBox Err.Description, , strTitle Resume exit_proc End Sub hth |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 23rd May 2013 - 10:25 AM |