Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Supressing the ctrl-c and other keys during word automation in automation

Reply
Thread Tools

Supressing the ctrl-c and other keys during word automation in automation

 
 
apondu
Guest
Posts: n/a
 
      07-19-2007
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.wdKeyCateg oryCommand,"DoSomeThing",app.BuildKeyCode(Word.WdK ey.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 http://www.velocityreviews.com/forums/(E-Mail Removed)

Thanks for the help

Regards,
Govardhan

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Supressing sign extension Dave C++ 4 10-10-2004 04:36 AM
Supressing Unused Parameter Warnings Michael B Allen C Programming 11 05-08-2004 08:21 AM
Supressing Menu and Toolbars on Webpage Herb Stull ASP .Net 3 02-25-2004 06:32 PM
Supressing PyChecker warnings Jp Calderone Python 1 01-16-2004 09:07 PM
Modifying a Word document without using Word Automation Michael G. Schneider ASP General 5 12-16-2003 06:52 PM



Advertisments