V2K3 Setting Toolbar via code hoses Zoom command

  • Thread starter msnews.microsoft.com
  • Start date
M

msnews.microsoft.com

Hello,
I have a peculiar problem that showed up in our addon beginning with Visio
2003. Any help would be apprecated. In short, as soon as our VB6 addon
manipulates the Standard toolbar using the UI Object, the Zoom command
disappears from the toolbar.

Further testing shows that if I loop through all the toolbar items on the
Standard toolbar, the Zoom command doesn't even show up. For example, the
code below simply gets the Standard toolbar, then loops through all the
buttons and does a debug.print of the caption for each button:

Set uiObj = gVisApp.BuiltInToolbars(0)
For intCount = 0 To tbrSetDrawing.Toolbars.Count - 1
Set tbrStandard = tbrSetDrawing.Toolbars.Item(intCount)
If tbrStandard.Caption = "Standard" Then
Debug.Print tbrStandard.Caption
For intX = 0 To tbrStandard.ToolbarItems.Count - 1
Set tbrItem = tbrStandard.ToolbarItems.Item(intX)
Debug.Print tbrItem.Caption
Next intX
Set tbrItem = Nothing
End If
Set tbrStandard = Nothing
Next intCount

The output from this in the debug window is:
Standard
New
Open
Microsoft Office Visio Help
Save
E-mail
Print Page
Print Preview
Spelling
Researc&h...
Cut
Copy
Paste
Delete
Format Painter
Undo
Redo
Shapes
Pointer Tool
Connector Tool
Text Tool
Drawing Tools

The Zoom command should come after the Drawing Tools, but doesn't. Not to
mention the Microsoft Office Visio Help appears between the Open and Save
commands, yet in Visio, it actually appears at the end of the toolbar.

Does anyone have any idea what's going on? This works perfectly in Vision
2000 and 2002.

Thanks so much.
Carl Mudryk
C-mach Technologies Inc.
 

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