Unwanted Tool Bar

M

McCordic

When I open an existing file on my laptop (and only on my laptop), there is a vertical tool bar on the left side of the screen that obscures part of my text. It has the icons for Exit Design Mode, View Codes, Check Box, Command Button and several others. There is another box, a small one with only one icon, for Exit Design Mode. I have to X out these boxes every time I open a file. How can I get rid of them so that they will not appear automatically when I open a file? I am using Word 2002 with Windows XP.
 
D

Dreamboat

Generally, this behavior occurs because you have macros or VBA components in the document, i.e., either there's macros in the document or Word thinks there is. Here's an excerpt from my book

Scenari
You may have or receive files that contain code. You don’t know what the code is for and you don’t want the code in the document. Or you regularly record macros in documents, and then later want to delete the code from the documents
Solutio
Rather than use the manual method of removing code, as described on page 20-7 you can use this code. The code must be placed in your normal.dot file so that it can be safely used on other files. You can use this code to clean code from any Word document except normal.dot. The document must be open when you run the macro. To run it, hit Tools-Macro-Macros and double-click the DeleteAllVBA macro
Hit Alt+F11 to open the VB Editor. Double-click Project (Normal) at the left, and hit Insert Module. In the code window for the new module, paste the following code

Public Sub DeleteAllVBA(

Dim vbComp As Objec

For Each vbComp In ActiveDocument.VBProject.VBComponent

With vbCom
If .Type = 100 The
.CodeModule.DeleteLines 1, .CodeModule.CountOfLine
Els
ActiveDocument.VBProject.VBComponents.Remove vbCom
End I
End Wit
Next vbCom

End Su
 
Top