Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2008

Tip: Looking for answers? Try searching our database.

Persistent toolbar .... how irritating

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gvm - 18 Feb 2008 02:12 GMT
This seems so trivial but it isn't to me. I have a Word doc which when
opened, shows the 'Control Toolbox' toolbar as well as a small dialog box
that allows me to exit 'Design Mode'. I don't want these items to appear so I
close the latter and I turn the former off at View/toolbars/Control. I then
save the document.

When I then re-open the doc, the same two items re-appear. Why? It doesn't
happen with other documents.
TIA ... Greg
Jay Freedman - 18 Feb 2008 03:26 GMT
>This seems so trivial but it isn't to me. I have a Word doc which when
>opened, shows the 'Control Toolbox' toolbar as well as a small dialog box
[quoted text clipped - 5 lines]
>happen with other documents.
>TIA ... Greg

That happens when you use any control from the Controls Toolbox and you have
your macro security level set to High or Very High, which disables macros and
the ActiveX controls from the toolbox. And when the controls are disabled, the
document automatically switches to design mode.

You can (a) set the level (Tools > Macro > Security) to Medium and click the
Enable button every time you open the document; or (b) remove all Control
Toolbox objects from the document and replace them with form fields (which
unfortunately require "protect document for forms" and have their own set of
drawbacks).

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
gvm - 18 Feb 2008 07:03 GMT
Thanks Jay. How do I locate the control toolbox objects please? None are
required so if some found there way into the document inadvertently I would
like to find them and delete them,
TIA ... Greg

> >This seems so trivial but it isn't to me. I have a Word doc which when
> >opened, shows the 'Control Toolbox' toolbar as well as a small dialog box
[quoted text clipped - 22 lines]
> Microsoft Word MVP        FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
Jean-Guy Marcil - 18 Feb 2008 13:43 GMT
> Thanks Jay. How do I locate the control toolbox objects please? None are
> required so if some found there way into the document inadvertently I would
> like to find them and delete them,
> TIA ... Greg

Look for check boxes, dropdown lists, text boxes or list boxes, etc. They
are the objects you can insert from the toolbar that appears and that you do
not want... While in desiign mode, select them and hit delete on the keyboard.
gvm - 18 Feb 2008 23:33 GMT
Jean-Guy, there are not any of the objects you mention apparent in the
document. Maybe there is one there that was put there by accident and is not
apparent because it is not functional. Is there any way of selecting control
toolbox objects? TIA .... Greg

> > Thanks Jay. How do I locate the control toolbox objects please? None are
> > required so if some found there way into the document inadvertently I would
[quoted text clipped - 4 lines]
> are the objects you can insert from the toolbar that appears and that you do
> not want... While in desiign mode, select them and hit delete on the keyboard.
Jean-Guy Marcil - 19 Feb 2008 14:00 GMT
> Jean-Guy, there are not any of the objects you mention apparent in the
> document. Maybe there is one there that was put there by accident and is not
> apparent because it is not functional. Is there any way of selecting control
> toolbox objects? TIA .... Greg

They could be hidden, off the page, or behind other objects...

Run the following code to spot each one:

Sub test()

Dim inShpActiveX As InlineShape
Dim shpActiveX As Shape

For Each shpActiveX In ActiveDocument.Shapes
   If shpActiveX.Type = msoOLEControlObject Then
       MsgBox shpActiveX.OLEFormat.Object.Name
       shpActiveX.Select
       ActiveDocument.ToggleFormsDesign
       Exit Sub
   End If
Next

For Each inShpActiveX In ActiveDocument.InlineShapes
   If inShpActiveX.Type = wdInlineShapeOLEControlObject Then
       MsgBox inShpActiveX.OLEFormat.Object.Name
       inShpActiveX.Select
       ActiveDocument.ToggleFormsDesign
       Exit Sub
   End If
Next

End Sub

Hit delete on the keyboard once you have spotted them.

Or, if you do not care to see where and what they are, run this instead:

Sub test()

Dim inShpActiveX As InlineShape
Dim shpActiveX As Shape

For Each shpActiveX In ActiveDocument.Shapes
   If shpActiveX.Type = msoOLEControlObject Then
       shpActiveX.Delete
   End If
Next

For Each inShpActiveX In ActiveDocument.InlineShapes
   If inShpActiveX.Type = wdInlineShapeOLEControlObject Then
       inShpActiveX.Delete
   End If
Next

End Sub

I must use two "For...Next" blocks because ActiveX controls, like almost any
object on the page, can be inline or floating, which are two totally
different critters...

If you still experience problems, look in the VBA editor for any userforms
associated with the document.

If you need help with the macros, see
  http://word.mvps.org/faqs/macrosvba/CreateAMacro.htm
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.