My Assistant
![]() ![]() |
|
|
Dec 19 2009, 05:11 PM
Post
#1
|
|
|
UtterAccess VIP Posts: 7,590 From: South coast, England |
Dear friends
I have just been asked to update an A2000 db to A2007, which has forced me to really get to grips with the A2007 ribbon! All appears to be working well, opening forms / reports / running code / saving files / Searching for text etc etc, except... If I allow the db to open automatically (without holding the shift key down) the icons for: Export to Word, Export to Excel, Export to Text don't appear on the custom report ribbon. (Export to PDF or XPS still appears OK) If I hold the shift down when I open the db and then run the autoexec macro, then, when a report is opened, the custom report ribbon opens fine and includes all the commands (Export to Word, Export to Excel, Export to Text and Export to PDF or XPS). which is what is wanted. Can anyone point out why this is happening? - I'm stuck for ideas! the ribbon XML is: CODE <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true"> <tabs> <tab id="grpRprt1" label="File"> <group id="grpPrint" label="Print" visible="true"> <control idMso="PrintDialogAccess" size="large" label="Print" imageMso="PrintDialogAccess"/> </group> <group id="grpClgrpRprt2" label="Close"> <button id="cmdExitReport" label="Close Report" imageMso="PrintPreviewClose" size="large" onAction="onCloseObject"/> </group> <group id="grpRprt3" label="Export"> [color="red"] <button idMso="ExportExcel" size="large" /> [/color] <separator id="Rpts_sprtr1" /> [color="red"]<button idMso="ExportWord" size="large" />[/color] <separator id="Rpts_sprtr2" /> [color="red"]<button idMso="ExportTextFile" size="large" />[/color] <separator id="Rpts_sprtr3" /> <button idMso="FileSaveAsPdfOrXps" size="large" /> </group> </tab> </tabs> </ribbon> </customUI> the bits in red are the lines that are apparently ignored Thanks in advance. |
|
|
|
Dec 19 2009, 05:20 PM
Post
#2
|
|
|
Rent-an-Admin Posts: 8,772 From: Banana Republic |
I fear I don't have a direct answer for that anomaly you described.
However, two things to test: 1) What happen if you omit the separators? 2) What about omitting the size setting? Does that anomaly persists in either case? |
|
|
|
Dec 19 2009, 05:39 PM
Post
#3
|
|
|
UtterAccess VIP Posts: 7,590 From: South coast, England |
Hi BananaR
Thanks for your quick reply Tried out your suggestions and removed both the separators and the size settings. Afraid the anomoly still persists (IMG:http://www.utteraccess.com/forum/style_emoticons/default/confused.gif) |
|
|
|
Dec 19 2009, 05:46 PM
Post
#4
|
|
|
UtterAccess VIP Posts: 7,590 From: South coast, England |
Hi BananR
Sorted! added 'visible="true" to each odd line Doesn't explain why the anomoly though! Thanks for your help - it jogged my mind into finding the answer o! |
|
|
|
Dec 19 2009, 06:06 PM
Post
#5
|
|
|
UtterAccess VIP Posts: 1,776 From: Edmonton, Alberta Canada |
Reading what you say, you mention that the ribbon WORKS FINE if you hold down the shift key (so, things like delimiters etc. in your ribbon CAN NOT be the problem since the ribbon as you state works just fine).
And, also, if your ribbon had errors in it, you would see the errors, and or ribbon would not display at all. As you stated the ribbon options display, but ONLY when you don't use the shift key. Since you using built-in options, then this is likey due to "allow full menus" being un-checked in your startup options. Just change the Allow full menus option in your options, and the icons will appear… Albert D. Kallal Edmonton, Alberta Canada kallal@msn.com |
|
|
|
Dec 19 2009, 06:14 PM
Post
#6
|
|
|
Rent-an-Admin Posts: 8,772 From: Banana Republic |
Interesting, Albert.
I have to say, though, that would be very odd way to do it, as I was under the impression that only 3 specific buttons didn't show up unless he held the shift down but otherwise the rest of customization worked. He had another idMso referencing a Print Dialog and didn't mention it being break. That would be quite inconsistent and confusing way to implement this, no? |
|
|
|
Dec 19 2009, 06:41 PM
Post
#7
|
|
|
UtterAccess VIP Posts: 7,590 From: South coast, England |
Hi Albert
In part of the code called by the autoexec code I do clear the "allow full menus" as a part of the measures to stop my users getting into the db tables / queries and doing what they ought not to do, So I didn't really want to leave the option set. However I did try your suggestion, and setting "allow full menus" does correct the problem. The ribbon only displayed correctly when I held the shift key down, (and ran the autoexec 'manually'). Interestingly the "allow full menus" option was cleared in both cases when the DB was started, and you might then have expected the ribbon not to display the buttons in either case. Also the PDF/XPS button is a built in option so you also might expect it to display similar characteristics. Setting visible="true" in the xml resolves the problem without needing to set the "allow full menus" option, and so I will stick to that. I still believe there is some sort of anomolous behaviour here, but thank you for the discussion and insight - much appreciated. (IMG:http://www.utteraccess.com/forum/style_emoticons/default/thanks.gif) |
|
|
|
Dec 19 2009, 09:09 PM
Post
#8
|
|
|
UtterAccess VIP Posts: 1,776 From: Edmonton, Alberta Canada |
A nice thanks right back at you...
QUOTE Setting visible="true" in the xml resolves the problem without needing to set the "allow full menus" That is quite neat. I did not know of this workaround. That's why I help here, it seems I usually wind up learning more then I know, and so I really do appreciate your follow up – we all learn from people when they come back and share things like this. Using built-in options usually don't show if you un-check full menus, but your workaround is nice. I always left the full menus option active since with custom ribbons I am controlling everything the user sees anyway. I not clear why you have custom code for your close button? You just use the following for your report close button: CODE <group id="Exit" label="Exit"> <button idMso="PrintPreviewClose" size="large"/> </group> Albert D. Kallal Edmonton, Alberta Canada kallal@msn.com |
|
|
|
Dec 19 2009, 09:38 PM
Post
#9
|
|
|
UtterAccess VIP Posts: 1,776 From: Edmonton, Alberta Canada |
QUOTE That would be quite inconsistent and confusing way to implement this, no? I can't say it is inconsistent. (but it certainly not ideal behavior in this case) and it was not an behavour I was aware of! The result here is that some built in menu items are marked as internal menu items as such when you choose the hide built in menu option and they will hide. However, it seems not all buttons hide when you disable built in butons. This we just found out here now! So, it is clear to me that un-checking "built-in menus option" does hide these built-in buttons when in custom ribbons. I am not really surprised by this behavior. However, I am MOST surprised that some buttons have this system hide setting and some don't. As mentioned, I did not know this and furthermore I did not know the workaround of visible = true fixes this issue anyway. Albert D. Kallal Edmonton, Alberta Canada kallal@msn.com |
|
|
|
Dec 19 2009, 11:36 PM
Post
#10
|
|
|
Rent-an-Admin Posts: 8,772 From: Banana Republic |
Albert, I apologize for not being on what was 'inconsistent' behavior. As you rightly pointed out, the inconsistency isn't with hiding built-in buttons but rather not doing this for all buttons as we just found out here.
The visible workaround is a great way to work with this. Though you're probably right that creating custom ribbons will usually cover most issues, I would be the sort of person to reach for unchecking the show all menus 'just in case'. We sure learned something here. (IMG:http://www.utteraccess.com/forum/style_emoticons/default/sad.gif) |
|
|
|
Dec 19 2009, 11:51 PM
Post
#11
|
|
|
Rent-an-Admin Posts: 8,772 From: Banana Republic |
Hey. Had a thought after the last post... The other built in button for print dialog showed up without a visible... Does it goes away if you omit the image attribute?
Maybe it wasn't just visible but rather setting _any_ attribute will then override the effects of unchecking show built in menus?? |
|
|
|
Dec 20 2009, 06:19 AM
Post
#12
|
|
|
UtterAccess VIP Posts: 7,590 From: South coast, England |
Hi Albert
Glad I could add to the discussion! Re clearing the "Allow full menus" option, this is from developing earlier versions of Access, to prevent users from being to be able to get around the menu settings I provided, and I still use the method - even though it may not strictly be necessary in A2007 - a bit of a 'Belt and Braces' solution! Thanks for pointing out idMso="PrintPreviewClose", and you are right, there is no reason to use the custom menu - I am really only just getting to grips with the Ribbon and when I wrote this bit of xml had not sorted out all the available commands and their names. In fact I don't know where I can find a list of all the commands and descriptors for the xml ribbon - I recently downloaded a file from the MS website with a list of all the control names (AccessRibbonControls.xlsx) but this doesn't show the commands image and seems to repeat some commands, so it has been a bit of guesswork! Can you suggest a source? (My A2007 help file does not work as there seems to be a clash between the two versions of access (A2003 and A2007) installed on my PC). A suggestion as to the cause of the different behaviour of the Export to PDF button, is that the export to pdf function is an additional download, and not part of the original A2007 in built functions. (Doesn't justify the different behaviour though!) Thanks for your help (IMG:http://www.utteraccess.com/forum/style_emoticons/default/thumbup.gif) (IMG:http://www.utteraccess.com/forum/style_emoticons/default/thanks.gif) |
|
|
|
Dec 20 2009, 12:01 PM
Post
#13
|
|
|
Rent-an-Admin Posts: 8,772 From: Banana Republic |
Here's an icon gallery for 2007.
FWIW, you should be able to use the same idMso for the imageMso to get the image that you see with other button. HTH. |
|
|
|
Dec 20 2009, 04:08 PM
Post
#14
|
|
|
UtterAccess VIP Posts: 1,776 From: Edmonton, Alberta Canada |
>In fact I don't know where I can find a list of all the commands and descriptors for the xml ribbon
I use this site extensive...it as good as it gets...... http://www.accessribbon.de/en/index.php?Ac...bbon_Attributes Albert D. Kallal Edmonton, Alberta Canada kallal@msn.com |
|
|
|
Dec 20 2009, 04:59 PM
Post
#15
|
|
|
UtterAccess VIP Posts: 7,590 From: South coast, England |
Hi BananaR and Albert
Thank you both for your links, I've downloaded the xlsx file and added the access ribbon link to my favourites - that should make things a lot easier in the future (IMG:http://www.utteraccess.com/forum/style_emoticons/default/thanks.gif) All I need now is a stronger pair of glasses to read the icons in the xlsx file (IMG:http://www.utteraccess.com/forum/style_emoticons/default/sad.gif) |
|
|
|
Jan 19 2010, 03:02 PM
Post
#16
|
|
|
New Member Posts: 7 |
Thanks for your help
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 22nd May 2013 - 07:14 PM |