First of all, as I can see, you are using Automation API to achieve the result. In case you have active or trial Developer license, you can consider contacting us via Helpdesk platform to get prompt replies.
As for the scenario that you are trying to run through: there are several mistakes in the snippet that you’ve provided but also there is easier way to make it done. You can simply use InsertAndReplaceContentControls method to insert Content Control with predefined content and add bookmark on it right away. The fact that Content Control is placed right at the cursor position also comes in handy.
In combination with connector you can do it this way:
Here Script string defines all operations you’d like to perform inside Content Control. In your case it places text inside the box and adds bookmark on it independently from the rest of the document.
Please note that in this case data inside Content Control is isolated from the rest of the document when method is executed.
As I can see you’ve created separate topic with your current solution. Please do not post duplicate replies in another posts and await reply in your one.