KeyBinding Word 2007 Problem (VSTO)

J

Jonathan Ruckert

Hi All,

I am trying to bind a new command using the KeyBindings.Add command. It is
successful in recognising inbuilt existing commands (e.g. FileOpen etc),
however when i try to call a function within my own code it doesnt work.

The question is do i need to declare a function in any special way for it to
be recognised? (ComVisible?)

e.g.

public void TestFunction()
{
MessageBox.Show("Test");
}
 
P

Peter Huang [MSFT]

Hi,

Currently the supported develop package VSTO is VSTO 2005 or the newest
VSTO 2005 SE(which did not support Document level support) which is
released recently.

So firstly I would like to collect more information about your development
environment.
e.g. What is the Word 2007 version are you using(currently you should be
able to download the released version in MSDN subscription site).
What is the develop package are you using? VSTO 2005 or VSTO 2005 SE?
What is the project type?
Word Addin? or others.

Please post the information above so that I can research the issue more
efficiently.

Thanks!


Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jonathan Ruckert

Hi Peter,

Thanks for the Reply.

We are using Word Professional 2007 (RTM), Visual Studio 2005 with VSTO 2005
SE (RTM) and we are trying to create a Word Add-in.

Cheers,
Jonathan
 
P

Peter Huang [MSFT]

Hi Jonathan,

Thanks for your quickly reply!
Currently I am building an environment for this issue.
Also based on my research so far, it seems that the KeyBinding only works
for Macro inside the document VBA project.
I will keep researching and update you ASAP.

Thanks for your understanding!

Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Peter Huang [MSFT]

Hi Jonathan,

Based on my research, I think we need to implement a VBA call back into the
managed code.
So that I think we need a Word COM Addins(Shared Addin).

Here is a link which implement a call back between VBA/ComAddin.
http://groups.google.com/group/microsoft.public.office.developer.com.add_ins
/browse_frm/thread/14302fe4ebb687e1/db1477a7cd61d0bf?lnk=st&q=callback+COM+A
ddin+vba+%22v-phuang%22&rnum=1&hl=en#db1477a7cd61d0bf

If you still have any concern,please let me know.


Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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