Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    London, United Kingdom
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Forms Unprotect/Delete field code/Reprotect (2000 SR2)

    I need help in creating a macro keeping in mind I don't know VB. (I would add a smilie here for "thick", but there isn't one!)

    I have created a form with a drop down field using the forms toolbar becuase I don't know how to use the control box toolbar

    Users will select from a drop down list and once they have made their selection they need to delete the field code yet leave the value of their selection. (Because if you e-mail the form, the recipients get the drop down.)

    You would think that to unprotect the doc. highlight the field, and Ctl+Shift+F9 is easy enough, but OOOOOHHHH NOOOO, the users think that this is too difficult to remember, (Oh to think these people drive cars <img src=/S/sarcasm.gif border=0 alt=sarcasm width=15 height=15> <img src=/S/disappointed.gif border=0 alt=disappointed width=15 height=15>) they want a little toolbar to pop up when they open the template and after they have made their selection, all they have to do is click on the toolbar which will run a macro that will unlock the template, select the field, delete the field code and leave the value and then reprotect the doc.

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Forms Unprotect/Delete field code/Reprotect (2000 SR2)

    If you want to unlink all fields in the document, you could create a macro with the following contents:

    With ActiveDocument
    .Unprotect
    .Fields.Unlink
    .Protect Type:=wdAllowOnlyFormFields, NoReset:=True
    End With

    If you want to unlink only the drop down list, you'd have to find its index (is it the first, second, ... field in the document?) and use that:

    ...
    .Fields(3).Unlink
    ...

    You can assign the macro to a toolbar button the usual way.

  3. #3
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    London, United Kingdom
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Forms Unprotect/Delete field code/Reprotect (2000 SR2)

    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>

    Works perfectly. I worship at your feet

  4. #4
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Phoenix, Arizona, USA
    Posts
    205
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Forms Unprotect/Delete field code/Reprotect (2000 SR2)

    Hetty, I am responding to the fact that people who are not smart enough to use Ctrl+Shift+F9 drive cars. I really chuckled at this because I deal with the same thing all of the time. Thanks for the laugh.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •