![]() |
#2
|
||||
|
||||
![]()
You could use something along the lines of:
Code:
Sub InsertTriangleBefore() Dim RngDoc As Range, RngFnd As Range, i As Long, TargetList TargetList = Array( ... ) ' put list of terms to find here For i = 0 To UBound(TargetList) Set RngDoc = ActiveDocument.Range With RngDoc With .Find .Text = TargetList(i) .Format = True .MatchCase = True .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Execute End With Do While .Find.Found = True Set RngFnd = .Duplicate With RngFnd .Collapse wdCollapseStart .Text = ChrW(9660) With .Font .Size = 8 .Color = 49407 .Superscript = True .Subscript = False End With End With .Collapse wdCollapseEnd .Find.Execute Loop End With Next End Sub PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab at the bottom of this screen
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
complex, connected, insert, macro, n00b |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding information from a array into a table | jcorti | Word VBA | 4 | 01-10-2014 10:58 PM |
![]() |
tinfanide | Excel Programming | 4 | 12-26-2012 08:56 PM |
![]() |
andrei | Excel | 9 | 02-03-2012 03:40 AM |
How to capture start and ending Ref. Nos. in an array | KIM SOLIS | Excel | 5 | 09-07-2011 07:43 AM |
Look up an array based on user input | johnsmb | Excel | 2 | 01-07-2011 01:12 PM |