![]() |
|
|
|
#1
|
||||
|
||||
|
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 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
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] Last edited by macropod; 12-29-2010 at 01:45 PM. |
|
#2
|
|||
|
|||
|
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 |
|
| 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 |