I can create various ContentControls for Word 2016 using VBA code from within Word.

However, I am creating various Word templates through Excel, using Excel VBA code, based upon data in an Excel file.

When I attempt to create ContentControls in Excel for a Word document (calling ActiveDocument), I get an error:

Compile error:
Method or data member not found

For example, when called from Excel:

Dim objCC As ContentControl

Set objCC = ActiveDocument.ContentControls.Add(wdContentControlRichText)

It errors on “.ContentControls

If this is caused a missing reference in Excel, what is the appropriate reference to add in addition to the MS Word 16.0 Object Library?

Again, calling strictly from Word, it works fine.

Since this seems to be primarily an Excel issue, I have posted this within the Excel forum.

If there is another possible cause, any guidance would be appreciated.

Thank you.