Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/29/2022 in all areas

  1. It can be solved with a fairly simple macro. Sub ReplaceTextWithImage(findText as string, imagePath As String) If Selection.Find.Execute(FindText:=findText, MatchWholeWord:=True, Forward:=True, Wrap:=wdFindContinue) = True Then Selection.InlineShapes.AddPicture FileName:=imagePath, LinkToFile:=False, SaveWithDocument:=True End If End Sub EDIT: added checking if text found and MatchWholeWord and continue search if out of selection range. Other checks should be added to the labview code (image file exists and findText not empty). Note, that the Selection.Find.Execute will ignore MatchWholeWord if there are special characters in the findText for some reason. I haven't found a reference to what charaters are "special". Special characters I tried and found: &, #, _ So I gueass pretty much every non alphabetical....
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.