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.