View Single Post
 
Old 03-10-2015, 01:10 AM
gmayor's Avatar
gmayor gmayor is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Text boxes are not in the text layer of the document so your macro doesn't see them. The following however should work

Code:
Sub UnlockCControls()
Dim oStory As Range
Dim oCC As ContentControl
    For Each oStory In ActiveDocument.StoryRanges
        For Each oCC In oStory.ContentControls
            oCC.LockContentControl = False
        Next oCC
        If oStory.StoryType <> wdMainTextStory Then
            While Not (oStory.NextStoryRange Is Nothing)
                Set oStory = oStory.NextStoryRange
                For Each oCC In oStory.ContentControls
                    oCC.LockContentControl = False
                Next oCC
            Wend
        End If
    Next oStory
lbl_Exit:
    Set oStory = Nothing
    Set oCC = Nothing
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote