Create a rich text control field in VBA for Word 2010
- by mkn
I have a control field where I dynamically add certain text. That works well so far. The problem is that in one text I have an input field where the user can type in text.
I need to hardcode the form text input field into the VBA code. How is this achieved? Or can someone point me in the right direction?
In the following code snippet I need to replace the [InputField] by a VBA input field.
ActiveDocument.SelectContentControlsByTitle("Bottom").Item(1).Range.Text = _
"Some Text" & vbNewLine & _
"Some Text" & vbNewLine & _
"Some Text" & vbNewLine & _
"Text [InputField] Text"