Solved

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

Posted on 2011-03-01
2
976 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

This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

717 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