![]() |
|
#4
|
||||
|
||||
|
Yes, it does sound like a job for a macro but there likely would need to be more than one macro.
Say for example, clicking on something runs a macro and the target content gets highlighted in Bold before the macro ends. Then the user moves the selection point - but the bolded text would remain bolded because there isn't a command to change it back as the selection moves away. Perhaps the de-selecting could happen automatically if the target area was defined with a Content Control as well as a bookmark. Then an OnExit macro could be implemented. For instance, if you place Rich Text Content Controls around some text, you can put these macros in your ThisDocument module. Code:
Private Sub Document_ContentControlOnEnter(ByVal ContentControl As ContentControl) ContentControl.Range.Font.Bold = True ContentControl.Color = wdColorAqua End Sub Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) ContentControl.Range.Font.Reset ContentControl.Color = wdColorWhite End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| documents print setup defined in page setup, but overriden by printer settings. macro required? | Rosemary | Word VBA | 6 | 02-18-2021 11:10 PM |
Help with some VBA code Required
|
dmcg9760 | Excel Programming | 9 | 03-01-2016 03:59 PM |
| Excel 2007 - formula or macro/vba code required | wrighty50 | Excel Programming | 3 | 05-13-2012 02:24 PM |
| Macro or routine required | evanhughes | Outlook | 0 | 11-18-2011 02:56 AM |
| Suggestion required | domex | Word | 0 | 10-06-2010 05:35 AM |