![]() |
|
#1
|
|||
|
|||
![]()
YES!! So, I kept trying things this morning and eventually got the macro working.
Thank you! I was able to find the piece I needed from within your code. I added: Or .Information(wdWithInTable) = True to the statement that ignores certain things in the document. Complete macro below: With ActiveDocument.Content.Find .ClearFormatting .Style = wdStyleNormal Do While .Execute(Forward:=True, Format:=True) = True With .Parent If Left(.Text, 1) = vbCr Or Left(.Text, 1) = " " Or Left(.Text, 1) = chr(12) Or .Information(wdWithInTable) = True 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 |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
benbob | Word VBA | 5 | 07-15-2018 03:20 AM |
![]() |
ArieH | Word VBA | 20 | 09-10-2017 04:23 PM |
![]() |
p89.schneider | Word | 6 | 03-24-2016 11:38 PM |
![]() |
caboy | Word VBA | 2 | 04-01-2015 07:00 AM |
Looping macros to add text to beginning and end of a paragraph | pachmarhi | Word VBA | 0 | 02-16-2009 06:57 AM |