Print Page | Close Window

Conflict between commandbar and microsoft word

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=20080
Printed Date: 20 May 2024 at 7:03am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Conflict between commandbar and microsoft word
Posted By: unforgiven
Subject: Conflict between commandbar and microsoft word
Date 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




Replies:
Posted By: mattwilkinson
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net