Macro to unlock content controls

Discussion in 'Word VBA' started by Thabi, Mar 6, 2015.

  1. Thabi


    Nov 5, 2013
    Likes Received:

    I have code that unlocks a locked content control in order for me to delete it via code. The only problem I have is that I am unable to make this work for content controls that are inside a textbox. Below is the code i'm using.

    Sub UnlockCControls()
    Dim oCC As ContentControl
    For Each oCC In ActiveDocument.ContentControls
    oCC.LockContentControl = False
    Next oCC
    End Sub
    Thabi, Mar 6, 2015
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.