DCOM Error : Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.

When we tried to use word automation from .Net in ASP .Net application earlier it was working but then it stopped working in some of the machine giving error
“Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.”.
We had DCOM setting in place, IIS setting was also ok. Then I got following solution:

  • I changed the AppID Registry key under HKEY_CLASSES_ROOT\AppID\WINWORD.EXE from old entry to {00020906-0000-0000-C000-000000000046}.

(for some it will work after this, but if still its not working go for second.)

  • 2. Also changed the DCOM setting.
    • a. Open the Component Service Console.(Either by running command: dcomcnfg OR by opening it from Control Panel->Administrative Tool -> Component Services)
    • b. Now Select ‘Microsoft Word Document’, Under Component Services->Computers->My Computer -> DCOM Config.
    • c. Do Right click and select Properties.
      it will open Microsoft Word Document Properties dialog.
    • d. In Microsoft Word Document Properties dialog, select Identity tab.
    • e. In Identity tab, if ‘The launching user.’, in our case third option was selected, so we selected 2nd option.

This may solve out problem, hope it would be helpful for you also. If you need to say something please feel free to speak through comments.

 

References:

http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/006cbbac-101a-40ea-ae16-d59a7a2da8b1

Advertisements
Published in: on November 3, 2009 at 4:17 pm  Comments (7)  
Tags: , , , , , , ,

Adding macro in to toolbar as tool bar button, creating macro and adding it, with small example

How nice it would be if your favourite macro is available as toolbar button. Its really easy to do. Suppose you have created a macro hello and you want to add it, then just follow these step:

Adding macro to toolbar

  1. Go to menu: tools->Customize… => it will open Customize window.
  2. In Customize window go to ‘Commands’ tab and select ‘Macros’ at left pane, all the macros you have created would be visible at right pane.
  3. Just drag the macro you want to toolbar.
  4. It would automatically create a button with macro name.

Customizing toolbar macro button

  1. Write click on macro toolbar button while Customize window is open.
  2. In this menu you can do all the customization. Changing name, image etc.
  3. You can also assign a shortcut key. Just put &1(if you want alt+1 to a shortcut key) or which ever combination you want.

Office tips and tricks: Creating and adding new toolbar in ms office, a very simple example

You would have seen many toolbars in your office app. Have you ever thought of having toolbar with your own name ;). Yes you can add new tool bar with some really simple step in to your office app(word/outlook/excel etc.). So here we go:
1. Go to menu: tools->Customize… => it will open Customize window.
2. In Customize window go to Toolbars tab and click on “New…” button. It will open a small window here you need to give toolbar name.
3. Your toolbar is ready to add.
4. You can drag buttons from Customize window’s Command tab.
5. For ex. in Command tab select ‘File’ at left pane and drag ‘Open’ in right pane to the newly created toolbar. Its done.

You can also add previously created macro in to this toolbar.