Macro to unlock content controls

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

  1. Thabi

    Thabi

    Joined:
    Nov 5, 2013
    Messages:
    2
    Likes Received:
    0
    Hi

    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
    1. Advertisements

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.
Similar Threads
  1. patricia.mitchell@mac.com

    How Do I Unlock Then Re-lock a Form Without Losing Content?

    patricia.mitchell@mac.com, Oct 2, 2006, in forum: Word VBA
    Replies:
    2
    Views:
    155
    patricia.mitchell@mac.com
    Oct 2, 2006
  2. KenderFaith

    Populating Content Controls with VBA

    KenderFaith, Feb 14, 2008, in forum: Word VBA
    Replies:
    4
    Views:
    194
    KenderFaith
    Feb 20, 2008
  3. Elvis

    Content Controls

    Elvis, Mar 20, 2008, in forum: Word VBA
    Replies:
    0
    Views:
    112
    Elvis
    Mar 20, 2008
  4. Ed Richard
    Replies:
    0
    Views:
    125
    Ed Richard
    Mar 23, 2008
  5. Word user 2007

    Content Controls and Comments

    Word user 2007, Apr 4, 2008, in forum: Word VBA
    Replies:
    0
    Views:
    156
    Word user 2007
    Apr 4, 2008
  6. Nasir Khan - VSTS Team

    Content controls behaviour inside <w:p>

    Nasir Khan - VSTS Team, Jun 10, 2008, in forum: Word VBA
    Replies:
    1
    Views:
    170
    Cindy M.
    Jun 10, 2008
  7. sarahj
    Replies:
    3
    Views:
    376
    Greg Maxey
    Apr 24, 2009
  8. Loulou
    Replies:
    1
    Views:
    226
    Jay Freedman
    Nov 6, 2009
Loading...