Solved

How to stop "Can't execute code in design mode" from appearing when starting Word 2010

Posted on 2011-03-01
2
941 Views
Last Modified: 2013-06-20
Everytime Word 2010 is started, either by opening a Word file or opening Word to create a new document "Can't execute code in design mode" message appears.  If you are opening a file it opens in "Design" mode and you can close it an work normally.  If you open Word to create a new document, you can close the message and Word works normally.  Therefore, it is not causing any problems, it would just be nice to not have the message appear.  I have deleted the "normal.dotm" file, clear out the cache, did a lot except remove and reinstall Office 2010.  It is not happening in any other program in the Office suite.  Office was upgraded from 2007 to 2010 and that is when the problem began.  Is it a registy issue?  Any help or suggestions would be greatly appreciated.
0
Comment
Question by:RRStewart
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 38

Accepted Solution

by:
puppydogbuddy earned 500 total points
ID: 35014550
Per the link below, place and execute the coded routine in a dotm, and it will fix the problem.  After the code has been executed, the problem should be fixed and you can remove it from the dotm.

          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

-------------------code---------------------------------------------------------------

Private Sub AutoOpen()

Dim Index As Byte

With ActiveDocument.VBProject
      For Index = 1 To .VBComponents.count
           With .VBComponents(Index)
                  If .HasOpenDesigner Then .DesignerWindow.Close
            End With
       Next
End With

End Sub

 
0
 

Author Comment

by:RRStewart
ID: 39263403
I've requested that this question be deleted for the following reason:

No longer an issue.  The user received a new computer and the problem has never appeared again.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Authors who set out to write any sort of lengthy piece for online submission—be it a long question or comment on a technical form, an article, or a substantial blog entry—often find it useful to work up a draft in an editor other t…
The Selection object is designed for user interaction. It has a Range property, so it can be used in most places that a Range object can. Recorded macros must use the Selection because they are simply copying what the user is doing. A Range prope…
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question