Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-09-2023, 01:53 AM
leurne leurne is offline Custom Ribbon modification Windows 10 Custom Ribbon modification Office 2021
Novice
Custom Ribbon modification
 
Join Date: Jun 2023
Posts: 9
leurne is on a distinguished road
Default Custom Ribbon modification

Hello all


I'm working on a template with lot of macro etc...
we have a customized Ribbon, but i don't understand how it's done because as soon as i save the file .dotm or docx, the customized ribbon disappear (and i still can see in option > customize Ribbon > add-ins and all the stuff but it's gray as it was deactivated...

Problem is: if i want to modify the template, as soon as i save it, i lose this customized ribbon...

I can find in the VBA code, what is the code used, but i can't find how to modify, or add this ribbon...

Do you have an idea?

I used also Custom UI Editor but, it's not exactly same...
Reply With Quote
  #2  
Old 08-09-2023, 02:11 AM
gmayor's Avatar
gmayor gmayor is offline Custom Ribbon modification Windows 10 Custom Ribbon modification Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

See Customize the Office Ribbon (It doesn't take rocket science)
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 08-10-2023, 12:33 AM
leurne leurne is offline Custom Ribbon modification Windows 10 Custom Ribbon modification Office 2021
Novice
Custom Ribbon modification
 
Join Date: Jun 2023
Posts: 9
leurne is on a distinguished road
Default

hi
yes i know this way to customize the ribbon, i was using it. However on the word document that I'm trying to edit, there is nothing (I can't modify it with the software)
So i think they modified it differently.
Also, when i'm saving the word document, the customize ribbon disappear (and that is a function that i would like to keep, it's a bit like an admin mode, only the people who has access to the main word template can use the customize ribbon, then when it's saved in docx, user can't use it).
Reply With Quote
  #4  
Old 08-10-2023, 05:26 PM
Guessed's Avatar
Guessed Guessed is offline Custom Ribbon modification Windows 10 Custom Ribbon modification Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

If you change the file extension to .zip and look inside it, does it have a file in the CustomUI folder?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #5  
Old 08-10-2023, 10:41 PM
leurne leurne is offline Custom Ribbon modification Windows 10 Custom Ribbon modification Office 2021
Novice
Custom Ribbon modification
 
Join Date: Jun 2023
Posts: 9
leurne is on a distinguished road
Default

Nop, no customUI
just:
_rels
customXml (????)
docProps
word
and a file: [content_types].xml.

I 've searched something related to ribbon or to somehting related in every folder and files, but nothing.
Reply With Quote
  #6  
Old 08-10-2023, 11:02 PM
Guessed's Avatar
Guessed Guessed is offline Custom Ribbon modification Windows 10 Custom Ribbon modification Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

If you don't have a customUI folder then you don't have ribbon code inside that document.

You can use your Custom UI Editor to place ribbon code in docx document. If that ribbon code relies on macros then the document will need to be a docm.

It is inefficient to place the ribbon code in a docx or docm document. Generally it is better to place the ribbon & macro code in a dotx or dotm template and attach that to the document. You can then attach that same template to lots of other documents so that the code doesn't need to be updated/maintained in lots of places.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #7  
Old 08-10-2023, 11:16 PM
leurne leurne is offline Custom Ribbon modification Windows 10 Custom Ribbon modification Office 2021
Novice
Custom Ribbon modification
 
Join Date: Jun 2023
Posts: 9
leurne is on a distinguished road
Default

the point is , i have a customized ribbon because there is an add-in tab with 4 buttons which call 4 different macro connected to the .dotm document... When i save the document the tab disappear, and when i click on one button, it's changing also the tab button (and 3 new button appears).
I would like to find where is this tab.

I've already make a new tab with customUI but it doesn't fit to what i want....
Reply With Quote
  #8  
Old 08-10-2023, 11:23 PM
leurne leurne is offline Custom Ribbon modification Windows 10 Custom Ribbon modification Office 2021
Novice
Custom Ribbon modification
 
Join Date: Jun 2023
Posts: 9
leurne is on a distinguished road
Default

if it's help, i've just find out a macro which modify my ribbon and remove the button:

.UpdateStylesOnOpen
Reply With Quote
  #9  
Old 08-11-2023, 06:26 AM
leurne leurne is offline Custom Ribbon modification Windows 10 Custom Ribbon modification Office 2021
Novice
Custom Ribbon modification
 
Join Date: Jun 2023
Posts: 9
leurne is on a distinguished road
Default

hop, i found
in fact you can create button also with reference Microsoft ActiveX Data Objects 2.7 Library (not sure it's exactly this one or if it's working with others)

but then i have this option:
Set ObjBouton = ObjBO.Controls.Add(msoControlButton)

and i can modify everything with it. Then it's ok
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom View on Ribbon rachekd Project 2 01-15-2018 06:33 AM
Styles in a Custom Ribbon inagalaxyfarfarawry Word 5 12-15-2015 11:18 AM
Custom Ribbon modification Need help with custom UI image gallery ribbon pfiggy PowerPoint 3 04-28-2013 07:13 AM
Custom Tab on the ribbon missing TechEd Word 2 09-14-2011 05:08 PM
Custom Ribbon modification Excel 2010 Custom Ribbon judicial85 Excel 3 12-05-2010 07:22 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:59 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft