View Single Post
 
Old 03-31-2015, 07:55 PM
Guessed's Avatar
Guessed Guessed is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
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

Try this
Code:
Sub PortionMarking2()
  With ActiveDocument.Content.Find
    .ClearFormatting
    .Style = wdStyleBodyText
    Do While .Execute(Forward:=True, Format:=True) = True
      With .Parent
        If Left(.text, 1) = vbCr Or Left(.text, 1) = " " Then
          'do nothing
        Else
          .InsertBefore "(U) "
        End If
        
        If .End = ActiveDocument.Content.End Then
          Exit Do
        Else
          .Move unit:=wdParagraph, count:=1
        End If
      End With
    Loop
  End With
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote