Where's the documentation that ...?

H

Howard Kaikow

Where's the documentation that one is permitted to create more than one
CommandBar with the same name in a given Context.
It works, but dag nab it, I cannot find the documentation that might tell me
how to distinguish between multiple CommandBars, with the same name, in a
given context.

How does Word distinguish between such identically named critters within the
same context?
It would seem the only distinguishing property would be the commndbars index
in the commandbar collection.
 
W

Word Heretic

G'day "Howard Kaikow" <[email protected]>,

I have never found any doco on it, but my own testing revealed that
Word assigns unique names to them via the Word data key and some junk
in the BFF that I can't read.

This same mechanism stores local context changes to foreign toolbars
(eg built-in ones).


Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Howard Kaikow reckoned:
 
W

Word Heretic

G'day "Howard Kaikow" <[email protected]>,

The data key is unreadable. Now the BFF, there's plenty of copy of
specs around that specify a toolbar space. This sometimes manifests
itself in strange virtual custom toolbars that you can see from VBA
but not from the GUI.

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Howard Kaikow reckoned:
 
H

Howard Kaikow

W

Word Heretic

G'day "Howard Kaikow" <[email protected]>,

Invalid URL, please retry.

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Howard Kaikow reckoned:
 
W

Word Heretic

G'day "Howard Kaikow" <[email protected]>,

If you try and delete a toolbar and it fails, you more than likely
have spurious references to customizing it from your global templates.
Move em all out, rename normal and your data key, open up that one
template explicitly, you now have your best chance of deleting it.

However, I believe it is possible to have several of these virtual
toolbar references in your template to anchor external references to
it. These also prevent it occurring. I use a rebuild process to help
start a new template and transfer the good bits over. It also gets rid
of broken list templates, corrupt objects etc so it serves numerous
cleaning purposes.

To avoid associated problems - like "Where the flip has my damn
toolbar gone" - I use a Master FaceId toolbar in a template used for
no other purpose to store each unique button face in.

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Howard Kaikow reckoned:
 
W

Word Heretic

G'day "Howard Kaikow" <[email protected]>,

<shrugs>

I still get invalid URL on that link and there's no hard link on your
page. Anyway, don't bother mate, I wont be reading any further replies
as I have wasted too many years on here already and I have no desire
to keep rewarding these people with my efforts when they have no
desire to reciprocate in their publicly stated manner.

If they are going to turn away helpers, they can do it themselves.

Bye!

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Howard Kaikow reckoned:
 
H

Helmut Weber

Hi Steve,
whatever the discussion was,
I would like to hear from you again in the future,
(as well as from Howard).
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 
K

Klaus Linke

Word Heretic said:
I have never found any doco on it, but my own testing revealed that
Word assigns unique names to them via the Word data key and some junk
in the BFF that I can't read.

This same mechanism stores local context changes to foreign toolbars
(eg built-in ones).


Hi Steve, Howard,

CommandBars also have an InstanceID property. I guess that's what Word uses
to keep track of them.

Regards,
Klaus
 
H

Howard Kaikow

Klaus Linke said:
Hi Steve, Howard,

CommandBars also have an InstanceID property. I guess that's what Word uses
to keep track of them.

I see no such property in the object browser or Help for the command bar
object.
 
K

Klaus Linke

I see no such property in the object browser or Help for the command bar
object.

It's a hidden property. Set the object browser to show hidden stuff (...
right-click on some empty space on a toolbar), or just try it out:
? CommandBars("Menu Bar").InstanceID


Re
<http://www.standards.com/OhMyWord/VBABugsFeatures/FailureToDeleteToolbar.h
tml>:

Which of the two *.dots am I supposed to test? And can't you simplify the
code a bit, so one can see what's happening (e.g., is it necessary to add
toolbars all over the place in AutoNew, AutoOpen ...)?
If you add more toolbars than your code deletes, and you run into problems
because you have given them the same name, can't you delete all toolbars
with a given name ... = loop toolbars, delete toolbar if it has that name?
Maybe there is a bug (for example a changing customization context), but
your code is too complex to really see what's going on.
For testing, I also wouldn't use "On Error Resume Next": If the code
doesn't behave properly, you *want* an error message.

Regards,
Klaus
 
H

Howard Kaikow

Didn't there used to be a way to ALWAYS display the hidden properties?
It is rather a nuisance to have to right click each time.
 
K

Klaus Linke

Didn't there used to be a way to ALWAYS display the
hidden properties?
It is rather a nuisance to have to right click each time.

Don't know of any. The InstanceID is probably the same data Steve is seeing
in the BFF /Registry.

Regards,
Klaus
 
H

Howard Kaikow

What about documentation?
If there is an InstanceID, there should be some way to use the InstanceID to
refer to the CommandBar.

Why does MSFT even bother to tell us about such hidden properties if they
are not going to provide "documentation" (yes, a silly word when referring
to MSFT) on how the critter is used?
 

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