I looked more into the XML side of things and actually managed to implement what I was looking for through that using code I found online. Absolutely delighted!
I have another (hopefully simpler) query now. Further down in the document is a dropdown CC for nearest hospitals and doctors to each site (this is in the sample document). My question concerns the following pieces of code:
Code:
ActiveDocument.ContentControls(10).Range.Text = StrDetails
Code:
ActiveDocument.ContentControls(12).Range.Text = StrDetails
What do I need to change these lines to so they refer to the CC Title or Tag instead of their position in the document? This is vital to me as employees may wish to remove preceding CCs if the data they contain is outdated (until I can update the code) which would cause the Hospital and MIU drop downs to stop working unless the code refers to them in a non-relative manner.
Kind regards,
Michael