none
Can't execute code in design mode error RRS feed

  • Question

  • Hello.  I am getting the error "Can't execute code in design mode" when starting Word 2010 and when opening a couple templates located in startup folder.  I get this error with all users but one.  All users I have tried are part of administrators group.  If I open templates with working user they edit, compile, save and run fine.  How do I diagnose this?

    Thanks

    Ken

    Wednesday, March 7, 2012 1:36 AM

Answers

  • After spending far too much time trying to figure out what template could be in design mode for all users except myself,  I found an autoexec that was looking for a value in the registry that existed for myself, but not the other users.  Adding the registry key fixed the program.  This was never noticed in WinXP/Word2003.  I will now change the program to always check for the reg. entry.  I am not very happy with the seemingly completely unrelated error message though...

    Ken

    • Proposed as answer by danishaniModerator Monday, March 12, 2012 9:29 PM
    • Marked as answer by kbax Monday, March 12, 2012 9:30 PM
    Monday, March 12, 2012 3:22 PM

All replies

  • Are you unclick design button?


    Oskar Shon, Office System MVP

    Press if Helpful; Answer when a problem solved

    Wednesday, March 7, 2012 8:21 AM
    Answerer
  • Thank you for your reply. 

    The template works with UserA, just not with UserB, or any other user.

    Using UserA, the design button is not clicked, and everything works fine. Using UserB to check the design button, I found that opening the template gives me an error:

    errno: 4248 - This command is not available because no document is open.

    No doc should be open.  I think this must be an errant error msg.  If I continue past the error, go into VBA Editor and execute the function referenced in the error, it works fine. But I cannot get the 'compile' option from the 'debug' window to become available. The design button is not clicked.

    This is running Word 2010 on Win7.  Is there some sort of security or rights issue?

    All templates have full access to admin group and for testing all tested users are admins.

    Thanks for considering my problem.

    Ken

    Wednesday, March 7, 2012 4:40 PM
  • You may check below similar thread, that might apply to your situation:

    http://answers.microsoft.com/en-us/office/forum/office_2010-office_install/cant-execute-code-in-design-mode-error-message/7061f74e-7d79-4d75-bc20-523f32e69596

    Hope this helps,


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"

    Please vote an answer helpful if they helped. Please mark an answer as an answer when your question is being answered.

    Friday, March 9, 2012 4:05 PM
    Moderator
  • After spending far too much time trying to figure out what template could be in design mode for all users except myself,  I found an autoexec that was looking for a value in the registry that existed for myself, but not the other users.  Adding the registry key fixed the program.  This was never noticed in WinXP/Word2003.  I will now change the program to always check for the reg. entry.  I am not very happy with the seemingly completely unrelated error message though...

    Ken

    • Proposed as answer by danishaniModerator Monday, March 12, 2012 9:29 PM
    • Marked as answer by kbax Monday, March 12, 2012 9:30 PM
    Monday, March 12, 2012 3:22 PM