• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1189
  • Last Modified:

MS Word: How to open a document with disabled Design Mode?

I have a Word document, which contains lot of Radio buttons. Now, when I open the document, design mode is enabled automatically. As I would like to send this document to other users I need it opened with disabled Design Mode. Otherwise radio buttons are selected instead of turning on. Any idea how to do this?

I tried already with "ActiveDocument.ToggleDesignMode" on event Document.open, but this code gets not executed.
0
fmokry
Asked:
fmokry
  • 5
  • 2
  • 2
  • +3
1 Solution
 
TigerManCommented:
Try this one:

If CommandBars("Control Toolbox").Visible = True Then
    ActiveDocument.ToggleFormsDesign
End If

Dave
0
 
fmokryAuthor Commented:
Hi Tigerman, I tried this also in event Document.Open, but as mentioned before, the code is not executed.
0
 
fmokryAuthor Commented:
Hi Tigerman, I tried this also in event Document.Open, but as mentioned before, the code is not executed.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
TigerManCommented:
Maybe it needs to run from a template file.

See Open Event in the online help.

dave
0
 
MacroWizardCommented:
I think there is more than one thing going on here since this shouldn't be happening. Can you send the document to me for a look-see?

linda.duguay@leewood.com
0
 
fmokryAuthor Commented:
I'm sorry, the document is Company Confidential
0
 
SteinerCommented:
Have you tried
If CommandBars("Control Toolbox").Visible = True Then
   ActiveDocument.ToggleFormsDesign
End If

in the Document_New event, too?
0
 
fmokryAuthor Commented:
I added

  If CommandBars("Control Toolbox").Visible = True Then
    ActiveDocument.ToggleFormsDesign
  End If

now for Document_New event also. But again, the code isn't executed. Additional I added a button with a simple MsgBox statement. But no popup appears. So, this code isn't executed also. Is there anything special to make VB code in Word executable?
0
 
SteinerCommented:
Do you have macros enabled??
Another thing to try whether macros are executed when you open a document:

Put a

Sub AutoOpen
  Msgbox "Open"
End Sub

into a module.

This one should too fire when the document is opened. It that code is executed, try putting the lines with the ToggleFormsDesign here.
0
 
MacroWizardCommented:
Does this happen with only this one document or can you replicate the situation with another document as well?
0
 
fmokryAuthor Commented:
I got it! The problem was the security level that has been set to High (Tools => Macros => Security). I defined this now as medium and now Word is asking if I allow to execute the macros.

However, thank you for your support!!!

0
 
PoshDogCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
PAQ/Refund - sorry Steiner, although you'd hinted at the solution
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

PoshDog
EE Cleanup Volunteer
0
 
Computer101Commented:
PAQed, with points refunded (20)

Computer101
E-E Admin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now