View Single Post
 
Old 05-28-2018, 07:31 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,158
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

If we assume that each list item is in its own paragraph...

If you want a border around the paragraphs then it should be done with a paragraph style. So the first step would be to create a paragraph style with a border and shading that you would like. Then you can run a macro like the following where 'Body Text' is the style you want for the multi-word paras.

Code:
Sub HighlightPhrases()
  Dim aPar As Paragraph
  ActiveDocument.Range.Style = "Normal"
  For Each aPar In ActiveDocument.Paragraphs
    If aPar.Range.Words.Count > 2 Then aPar.Style = "Body Text"
  Next aPar
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote