Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-28-2010, 11:59 PM
macropod's Avatar
macropod macropod is offline Form protected in design mode-can't do anything Windows 7 32bit Form protected in design mode-can't do anything Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,523
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Dan,



Try the following macro - it should get the 'locked' document out of design mode:
Code:
Sub UnlockFile()
If ActiveDocument.FormsDesign = True Then
  ActiveDocument.ToggleFormsDesign
End If
End Sub
Note: If this is the only macro in the document, you'll want to delete the code module before saving the document, otherwise you'll get a macro-enable prompt next time you open it.

If that works, but you still have the document going into design mode when you re-open it, try using the following to force it out of design mode every time it's opened:
Code:
Private Sub AutoOpen()
' Runs when this document is opened.
If ActiveDocument.FormsDesign = True Then
  ActiveDocument.ToggleFormsDesign
End If
End Sub
Unfortunately, this also means you'll get the macro-enable prompt whenever you open the document.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]

Last edited by macropod; 12-29-2010 at 01:45 PM.
Reply With Quote
  #2  
Old 12-29-2010, 12:53 PM
DrDtMM DrDtMM is offline Form protected in design mode-can't do anything Windows XP Form protected in design mode-can't do anything Office 2000
Novice
Form protected in design mode-can't do anything
 
Join Date: Dec 2010
Posts: 7
DrDtMM is on a distinguished road
Default Protected form opens in design mode

Kevin,

I went directly to your second suggestion, and inserted the code ahead of the first design object definition code. This seemed reasonable since it was labeled (general). Unfortunately, the form continued to open in design mode. Then it occurred to me that maybe instead of testing for FormsDesign and toggling FormsDesign if it were True, why not just set it to false. So I replaced the If...End If with ActiveDocument.FormsDesign = False. I was guessing of course, and haven't done any programming since the '70's, but it seemed logical. Unfortunately, that didn't work either. Assuming that your code is structured correctly and the parameter is, in fact, named FormsDesign and it is Boolean, I don't know why your code (or my variation) shouldn't have worked unless I put it in the wrong place. I tried to put the code elsewhere, but couldn't figure out how. So I am still sitting with the same problem....and no one else has suggested another solution. I do appreciate your willingness to help me.

Dan
Reply With Quote
Reply

Tags
design mode, protected form



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding table lines to protected form razberri Word Tables 2 10-27-2010 05:58 PM
Font size changes in a protected form..? jackbkmp Word VBA 0 03-03-2010 10:14 AM
Editing Password protected form fields in Word 2007 tamilan Word 2 02-16-2010 09:45 AM
Form design question aalytics Word 0 12-04-2009 07:32 PM
protected form with underline fillable spaces rohitsahib Word 0 02-02-2006 10:22 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:39 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft