View Single Post
 
Old 03-02-2016, 03:09 AM
Sinsearach Sinsearach is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Mar 2016
Posts: 2
Sinsearach is on a distinguished road
Thumbs up Maddening final defiance of the code.

AWESOME.
And so close now!! spent so many hours on this....
but while your revision checks each instance, it does not remove the original character, it just ADDS my bmps; take a look:
Code:
http://www.imagebam.com/image/105392468865976
Quote:
Originally Posted by macropod View Post
Try:
Code:
Sub InsertImages()
Application.ScreenUpdating = False
Dim i As Long
For i = 0 To 9
  With ActiveDocument.Range
    With .Find
      .ClearFormatting
      .Forward = True
      .Text = i
      .Replacement.Text = ""
      .Format = False
      .Wrap = wdFindStop
      .MatchCase = False
      .MatchWholeWord = False
      .MatchWildcards = False
      .MatchSoundsLike = False
      .MatchAllWordForms = False
      .Execute
    End With
    Do While .Find.Found
      .InlineShapes.AddPicture FileName:="C:\BMP Fonts\Q" & i & ".bmp", _
        LinkToFile:=False, SaveWithDocument:=True
      .Collapse wdCollapseEnd
      .Find.Execute
    Loop
  End With
Next
Application.ScreenUpdating = True
End Sub
Reply With Quote