Solved

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

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
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…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now