View Single Post
 
Old 08-01-2019, 08:35 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,103
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

You can loop through all the controls and apply the appropriate value from the worksheet to the titled control e.g. as follows. You are still going to have to associate 30 titles with the 30 Excel cells

Code:
Dim oCC As ContentControl
    For Each oCC In ActiveDocument.ContentControls
        Select Case oCC.TITLE
            Case "title of control 1"
                oCC.Range.Text = whatever
            Case "title of control 2"
                oCC.Range.Text = whatever
            Case "title of control 3"
                oCC.Range.Text = whatever
                'etc
        End Select
    Next oCC
__________________
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