Getting find/replace and hyperlinks to work in a locked form?

T

Throuble

I have created a Word document and turned it into a locked form. However,
when the form is locked, the find/replace and hyperlink functions are
disabled. Is there any way of enabling these in a locked form?
 
G

Graham Mayor

I am not sure why you would need find and replace in a protected form.
Protected forms are intended for data gathering, not for documents that
require free editing. If you want free editing, then you should consider
other methods of gathering the user information such as userforms. For the
basics, see Word MVP FAQ - Userforms
http://word.mvps.org/FAQs/Userforms.htm

for a more in depth explanation, see
http://gregmaxey.mvps.org/Create_and_employ_a_UserForm.htm

Nevertheless it could be possible to implement find and replace using a
macro to unlock the form, perform the replacement then relock the form eg

Sub ReplaceInForm()
If ActiveDocument.ProtectionType <> wdNoProtection Then
ActiveDocument.Unprotect Password:=""
End If
On Error Resume Next
Dialogs(wdDialogEditReplace).Show
ActiveDocument.Protect _
Type:=wdAllowOnlyFormFields, _
NoReset:=True, _
Password:=""
End Sub

http://www.gmayor.com/installing_macro.htm

and for Hyperlinks, see
http://word.mvps.org/faqs/tblsfldsfms/HLinksInForms.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top