Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Supressing the ctrl-c and other keys during Word automation in aut

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 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

Thanks for the help

Regards,
Govardhan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Supressing the ctrl-c and other keys during Word automation in aut


You have posted in an Excel VBA programming group.
Your question relates to Word using an unidentified programming language.
You probably won't get an answer here.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"apondu"
wrote in message
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 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

Thanks for the help

Regards,
Govardhan
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Supressing the ctrl-c and other keys during Word automation in

Hi Jim Cone,

I feel this is related to automation of office documents and if i could
supress the shortcut keys in Word then i must be able to do it in Excel so i
felt i could get some response here and posted it over here, regarding
language i am sorry but people would have some idea about the solution which
i am looking for so i thought i would get a rough idea on how to proceed.

Thanks,

Regards,
Govardhan

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use of Ctrl/end keys - Excel 2002 samoan Excel Discussion (Misc queries) 1 January 14th 08 09:45 PM
Ctrl Shift | Macro Stops | Creating Short Cut Keys gduron Excel Programming 3 April 6th 06 11:18 PM
Ctrl and Alt keys Danny[_4_] Excel Programming 0 April 2nd 04 07:37 PM
Disabling Ctrl, ALT keys turk5555[_4_] Excel Programming 3 December 19th 03 10:52 AM


All times are GMT +1. The time now is 12:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"