Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Conflict between commandbar and microsoft word
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Conflict between commandbar and microsoft word

 Post Reply Post Reply
Author
Message
unforgiven View Drop Down
Groupie
Groupie
Avatar

Joined: 24 February 2010
Location: Neverland
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote unforgiven Quote  Post ReplyReply Direct Link To This Post Topic: Conflict between commandbar and microsoft word
    Posted: 23 August 2012 at 3:27am

Hi Folk

I code vb6 and use commandbar to make menu and shortcut menu .it's work good ,but i need to add Microsoft word 10 reference to project for export data to Microsoft word. when i use this reference library vb6 generate compile error "Object Dose Not Source Automation Events" and it dose not run project .

i did use this code to make shortcut:

Public WithEvents KeyBindings As KeyBindings

 Set KeyBindings = CommandBars.KeyBindings
 KeyBindings.AddShortcut ID_FILE_Snapshot, "Ctrl+W" 

when i remark this 3 line program works good.

i use Commandbar Control 13.3.1

please guide me how can i solve this problem?

thank's all

Back to Top
mattwilkinson View Drop Down
Groupie
Groupie
Avatar

Joined: 23 June 2011
Location: Stoke-on-Trent
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote mattwilkinson Quote  Post ReplyReply Direct Link To This Post Posted: 02 October 2012 at 6:30am
There is a naming collision with the CommandBars object in the Office DLL, so just change this line:

Set KeyBindings = CommandBars.KeyBindings

to this:
Set KeyBindings = XtremeCommandBars.CommandBars.KeyBindings

And it should work
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.