View Single Post
 
Old 07-26-2023, 09:25 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,177
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You can change the selection to the full CC by using
Code:
Selection.Range.ParentContentControl.Range.Select
If you want the actual CC instead of the text in it you could use
Code:
  Dim aCC As ContentControl
  Set aCC = Selection.Range.ParentContentControl
  aCC.Title = "Found It"
Disclaimer: I didn't know the answer either so I had to search for this and found the relevant clue on this post by user11818836 on c# - How to set ContentControl.Range to the current ContentControl I am working from? - Stack Overflow
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote