A
apondu
Hi,
can someone help me and provide me the information on how to supress
the
default action of the shortcut keys of word during word automation.
I am using C#.Net
I have written a code but it generates a exception "Object Reference
not set
to an instance of a object".
I have posted my code here, can someone take a look at it and help in
understand and help me to get the solution for this
Word._Application app = null;
object c = Word.WdKey.wdKeyC;
object ctrl = Word.WdKey.wdKeyControl;
object mykey = null;
word.KeyBindings.ClearAll();
mykey =
word.KeyBindings.Add(Word.WdKeyCategory.wdKeyCategoryCommand,"DoSomeThing",app.BuildKeyCode(Word.WdKey.wdKeyControl,
ref c, ref missing, ref missing),ref missing,ref missing);
Here DoSomething is a dummy function
public void DoSomeThing()
{
}
It would be great if someone could help me.
My mail id is (e-mail address removed)
Thanks for the help
Regards,
Govardhan
can someone help me and provide me the information on how to supress
the
default action of the shortcut keys of word during word automation.
I am using C#.Net
I have written a code but it generates a exception "Object Reference
not set
to an instance of a object".
I have posted my code here, can someone take a look at it and help in
understand and help me to get the solution for this
Word._Application app = null;
object c = Word.WdKey.wdKeyC;
object ctrl = Word.WdKey.wdKeyControl;
object mykey = null;
word.KeyBindings.ClearAll();
mykey =
word.KeyBindings.Add(Word.WdKeyCategory.wdKeyCategoryCommand,"DoSomeThing",app.BuildKeyCode(Word.WdKey.wdKeyControl,
ref c, ref missing, ref missing),ref missing,ref missing);
Here DoSomething is a dummy function
public void DoSomeThing()
{
}
It would be great if someone could help me.
My mail id is (e-mail address removed)
Thanks for the help
Regards,
Govardhan