I wanted to know if it is possible to add content control to textboxes. So when the user clicks on a button, it inserts a textbox with content control around it. That way, when I add the Hide functionality, the textbox along with the text inside the box
hides. Right now I have content controls just by themselves and I can show/hide them. But to add them to a shape seems a little tricky since the user would be adding multiple textboxes (which would by default be placed at the same location).
All that I have right now is the code for adding a textbox.
First thing to do is to see if what you want is possible in the Word UI. Insert a text box, see if you can insert a content control into it, then see if making the text box invisible affects the content control. If you can do it in Word, you can do it with
To get the "internal range" of a text box (target for adding the content control), which will be independent of the main body of text, you need to assign the text box to a Word.Shape object as part of the AddTextbox method (Word.Shape shpTB = Document.Shapes.AddTextbox()).
Then, Word.Range rngTB = shpTB.TextFrame.TextRange