Office OCX & Office Component

Embedding MS Word, Excel and PowerPoint with Edraw Office Viewer Component

Enable or Disable Right-Click Context Menus in Word and Excel

Have you ever want the context menus in Microsoft Office just completely disappear? Edraw Office Viewer Component can easily enable or disable right click context menus in MS Word and Excel.

There are two methods to solve the issue in the component.

1. You can add DisableStandardCommand method in the WindowBeforeRightClick event. It will prevent the MS word and MS Excel to pop up the right click context menus.


function OA_WindowBeforeRightClick()
{
document.OA1.DisableStandardCommand(8, true);//
cmdTypeRightClick = 0x00000008,
}
<script language="javascript" for="OA1" event="WindowBeforeRightClick()">
OA_WindowBeforeRightClick();
</script>

 

enum CommandType{

cmdTypeSave = 0x00000001,

cmdTypeClose = 0x00000002,

cmdTypePrint = 0x00000004,             

cmdTypeRightClick = 0x00000008,

cmdTypeDoubleClick = 0x00000010,

cmdTypeIESecurityReminder = 0x00000020,

}CommandType;

 

2. Or you can call the DisableViewRightClickMenu method to remove the view right click menu directly. Use the method in the DocumentOpened event.

function OA_DocumentOpened()
{
document.OA1.DisableViewRightClickMenu(true);
}
<script language="javascript" for="OA1" event="DocumentOpened()">
OA_DocumentOpened();
</script>

Hide or Disable the MS Word Pop up menu While Right Click on the Active Document.

Pick Products>>
Edraw Max

flowchart, organizational chart, network diagram software

Lightweight yet incredibly powerful diagramming tool with rich examples and stencils. Easy to create professional-looking flowcharts, network diagrams, organizational charts and more. Free Download

Documents>>
Protect word document and set the read only property for MS Word
What's new in the Edraw Office Viewer Component
Open password protected word and excel file programmatically
Enable or Disable Right-Click Context Menus in Word and Excel
Embed Word, Excel, PowerPoint in your form or web page
How To embed and automate Office documents with Visual Basic
ActiveX Control Digital Signatures / Code Signing
Office Automation Support
Host multiple office viewer component in a form
Upload a file to web server in ASP.NET
How to insert HTML table in Word control
How to allow download the unsigned ActiveX control
Relative Resource>>
 
 

Home | Products | Order | Download | Support | Exchange Link | Contact | Site Map

Copyright © 2004-2012 Office OCX. All rights reserved.