How to restore the disabled button in MS Word

Sometimes in Microsoft Word or Outlook the default template file can become corrupt.

To restore it do the following:

1. Close all office applications including Word and Outlook.

2. Use the in the attachment.

3. Save it to your desktop to

4. Copy it to

C:\Documents and Settings\<youraccount>\Application Data\Microsoft\Templates

5. Replace the file that is already in that folder.

When you then open Word or go to create a new message in Outlook 2003 the problem should be fixed.

Host multiple Excel and Word components in a form

You can host multiple office component in a form or you can open multiple office instance in your internet explore with Edraw Viewer Component version 7.

The new version 7 has no toolbar-locked issues with multiple instances of Word or excel opened in several tabs or even inside single form.

Note: you need set the Frame hook policy as SetOnFirstOpen and Component activation policy as KeepUIActiveOnAppDeactive in the previous version. But it doesn’t work for the IE7 or IE8.

Frame hook policy
To correctly handle activation when the host gains or loses foreground status, the ActiveX control uses a frame hook. By default, the hook is set when the control is created. In some situations, especially when the control is used from a multi-threaded UI host or when the control is nested in a container control like a Tab page in a .NET WinForm application, the parent of the control at create time may not be the correct window for the control to hook when it is running. In these situations, you can use the FrameHookPolicy property to reset the hook at a more suitable time. For example, if you build a .NET WinForm solution, set the FrameHookPolicy property to SetOnFirstOpen in the Properties window.

Component activation policy
The sample control can support more than one instance of itself in a given host application. However, only one control can be active at a given time. This is a requirement of ActiveX Document hosting. To handle multiple instances in a single host, the control registers itself with a component manager. This lets the component manager keep track of the active control. Use the ActivationPolicy property to control how the embedded object is handled during component changes. The ActivationPolicy property can be set to one or more of the bit flags that are defined by the ActivationPolicy enumeration.

How to add Word Component to your ASP.NET project

It’s very easy to embed the MS Word in your project.  Please follow the steps:
1. Open Visual Studio.
2. Create a new ASP.NET project.
3. Don not attempt to add the Edraw Viewer Component for Word to the
Toolbox. It is a client component. You can add it as the HTML Object.
4. Copy all files at the ASP_c#\ to the new project folder.
( UploadAction.aspx UploadAction.aspx.cs Default.aspx.cs Default.aspx
Tester.doc )
5. Then add exist items…
6. Modify the Server Port in the Default.aspx.
6. Run.

Open password protected word and excel file programmatically

The Edraw Excel Viewer Component and Word Viewer Component support to ppen password protected word and excel file programmatically. You need call the SetValue method to set the password and writepassword before you call the Open method.

boolean SetValue([in] BSTR Name, [in] BSTR Value);
Sets the pasword, writepassword, domain and protectmodereminder
for the document.
Name: The name string.
Value: The value string.
The following vb script shows how to open a password-protected document. if the 1.docx file
has the password 1234, the writepassword 5678, you can use the follow sample.
Sub SetValue_Example()
edword.SetValue “Password”, “1234”
edword.SetValue “WritePassword”, “5678”
edword.Open “c:\1.docx”
End Sub

Why do I fail to download the ActiveX control on the client

The failure of loading Office Viewer ActiveX control has the following possible causes:
1. The security settings of IE on the client machine are incorrect.
Please verify the following security settings of IE to “Prompt” or “Enabled”:
a) Download signed ActiveX controls
b) Run ActiveX Controls and plug-ins
c) Script ActiveX controls marked safe for scripting
The dialog box of the security setting can be launched from menu
Tools>Internet Options. Then select the security tab.

Protect word document from changes

Edraw Word Viewer Component added the ProtectDoc method which helps to protect the specified document from changes. When a document is protected, users can make only limited changes, such as adding annotations, making revisions, or completing a form.

boolean ProtectDoc(WdProtectType ProtectType, [in, optional]
VARIANT Password);
ProtectType: The protection type for the specified document. WdProtectionType.
Password: Optional Object. The password required to remove protection from the specified
enum WdProtectType
wdAllowOnlyRevisions = 0,
wdAllowOnlyComments = 1,
wdAllowOnlyFormFields = 2,
wdAllowOnlyReading = 3,
wdNoProtection = -1,
The following vb script shows how to protect a document for only revisions.
Sub ProtectDoc_Example()
edword.ProtectDoc 0
End Sub

Disable Popup Menu in MS Office

You can disable or delete the context menu item in MS Word or Excel by VBA programming.


OA1.CreateNew “Word.Document”
Set objWord = OA1.ActiveDocument
objWord.Application.CommandBars(“Text”).Controls(“Cu&t”).Enabled = False
objWord.Application.CommandBars(“Text”).Controls(“&Copy”).Enabled = False
objWord.Application.CommandBars(“Text”).Controls(“&Paste”).Enabled = False
‘delete item directly
‘objWord.Application.CommandBars(“Text”).Controls(2).Delete ….


OA1.Open “c:\text.xls”
Set objExcel = OA1.ActiveDocument
objExcel .Application.CommandBars(“Cell”).Controls(“Cu&t”).Enabled = False
objExcel .Application.CommandBars(“Cell”).Controls(“&Copy”).Enabled = False
objExcel .Application.CommandBars(“Cell”).Controls(“&Paste”).Enabled = False
‘delete item directly
‘objExcel .Application.CommandBars(“Cell”).Controls(1).Delete
‘objExcel .Application.CommandBars(“Cell”).Controls(2).Delete ….

disable some toolbar buttons when a document is opened inside the app

I am using Edraw Word Viewer in my Windows Form application developed using C#.

I need to disable some toolbar buttons when a document is opened inside the app. When user launches MS Word application outside, then the buttons are disabled there too. How can I isolate the toolbar/menubar changes just within the activedocument inside the ActiveX control? I do not want standalone MS Word functions to be affected by the changes within Edraw Word Viewer.

Unable to register the Dll/OCX: Regsvr32 failed with the exit code

Getting this message at a couple of sites:

All have been 64bit Windows 2008 Servers on a Domain but we have also had successful installs on 64bit Windows 2008 Servers on a Domain.

Happens when using the Edraw Install or manually registering with regsvr32.

Add some text at the end of Word document

How to add some text at the end of document that is opened in Edraw office viewer, Kindly send me java script code so that i can enter signatures in my document. Please reply as soon as possible and send my java script Example.