Will macros creating new menus break with Ribbon?

E

Ed

I've been reading a few things about the new Ribbon UI coming up.
Currently, I have some macros which create new toolbar menu items using code
like:
Set newMenu = tlbr.Controls.Add(Type:=10)
With newMenu
.Caption = "Restore Toolbars"
.Enabled = True
With .Controls.Add(Type:=msoControlButton)
.Caption = "Restore"
.OnAction = "TlBarsReturn"
End With
End With

When the Ribbon comes out, will this code be disallowed and break my macros?

Ed
 
J

Jean-Guy Marcil

Ed was telling us:
Ed nous racontait que :
I've been reading a few things about the new Ribbon UI coming up.
Currently, I have some macros which create new toolbar menu items
using code like:
Set newMenu = tlbr.Controls.Add(Type:=10)
With newMenu
.Caption = "Restore Toolbars"
.Enabled = True
With .Controls.Add(Type:=msoControlButton)
.Caption = "Restore"
.OnAction = "TlBarsReturn"
End With
End With

When the Ribbon comes out, will this code be disallowed and break my
macros?

It will still work, but your custom control will be part of the Add-in tab,
i.e, it will not be displayed until the user clicks on the Add-in tab of the
Ribbon.
Also, since toolbars are not displayed anymore, the code will run, but only
the customized controls will appear under the Add-in tab, not the whole
toolbar itself; unless "tlbr" is defined as a custom toolbar, not a built-in
one, in that case, the whole custom toolbar will be displayed under the
Add-in tab.

At least this is my understanding and the result I got with some custom
toolbar I tested with Office 12.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
E

Ed

Thanks, Jean-Guy. I'm thinking this is going to create some problems. I
depend on my users seeing the name right there - a menu they've not seen
before, so it must be connected with this program they're running. If they
don't see it, they might not look for it - they'll just call me a hundred
times a day instead to ask how to do things! Maybe a modeless UserForm that
can be parked off to the side is the new way to go.

Is this new UI going to change the way you do things?

Ed
 
J

Jean-Guy Marcil

Ed was telling us:
Ed nous racontait que :
Thanks, Jean-Guy. I'm thinking this is going to create some
problems. I depend on my users seeing the name right there - a menu
they've not seen before, so it must be connected with this program
they're running. If they don't see it, they might not look for it -
they'll just call me a hundred times a day instead to ask how to do
things! Maybe a modeless UserForm that can be parked off to the side
is the new way to go.

I think I saw somewhere that the TaskPane object would be improved in the
Object model of Office 2007.
You will be able to create your own task panes, but you will need VS 2005.

See:
http://download.microsoft.com/download/a/6/1/a61dd5df-f52c-42d5-a95c-7a7fb7a6a466/CustomTaskPane.wmv
Is this new UI going to change the way you do things?

Yes, definitely.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
E

Ed

You will be able to create your own task panes, but you will need VS 2005.

Oh, man! It looks like the days of newbies and our smiley face macro icons
are over!
Yes, definitely.

What are you thinking of for ways to handle your need for custom toolbars
and menus? Anything a novice can handle?

Ed
 
J

Jean-Guy Marcil

Ed was telling us:
Ed nous racontait que :
Oh, man! It looks like the days of newbies and our smiley face macro
icons are over!

Yep!, I think this may even be part of their agenda.
What are you thinking of for ways to handle your need for custom
toolbars and menus? Anything a novice can handle?

Not really, the only way to customize the Ribbon itself will be through
XML, not for novices.

Also, you will be able to add/remove stuff from the Quick Access Toolbar
(QAT), including buttons for shortcut to macros you may write. But I doesn't
look like you will be able to add multi-level hierarchical style buttons to
the QAT, at least, not easily.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
E

Ed

Oh, man! It looks like the days of newbies and our smiley face macro
Yep!, I think this may even be part of their agenda.
the only way to customize the Ribbon itself will be through XML, not for
novices.
Also, you will be able to add/remove stuff from the Quick Access Toolbar
(QAT), including buttons for shortcut to macros you may write.

Well, if I can at least add a simple menu command and tell my users to look
to the QAT, I may yet survive. I may have to actually learn something,
though.

Thanks for the tips, Jean-Guy. I appreciate it.
Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top