?
Solved

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

Posted on 2011-03-01
2
Medium Priority
?
1,060 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 1000 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Do you ever need to create a 20 page Word document for some testing purpose? Are you tired of copying & pasting old boring "lorem ipsum" text over and over again, increasing font size and line space in order to make the document 20+ pages long? Look…
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…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
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…
Suggested Courses

850 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