Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…

943 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

4 Experts available now in Live!

Get 1:1 Help Now