Find text at the corner of the margin.
I want to find the text at the corner of the margin in InDesign using vb.net. I wrote a code to fine the text but it finds everywhere. Kindly give an idea to me to find a solution for this.
Dim myColor As InDesign.Color = indesignApplication.ActiveDocument.Colors.Add()
myColor.Model = InDesign.idColorModel.idProcess
myColor.ColorValue = New Object() {0, 100, 100, 0} ' CMYK values for red colormyColor
myColor.Name = "NBWordsHighlightcolor"
Dim searchWord As String = "commonplace"
indesignApplication.FindTextPreferences = InDesign.idNothingEnum.idNothing
indesignApplication.ChangeTextPreferences = InDesign.idNothingEnum.idNothing
indesignApplication.FindTextPreferences.FindWhat = searchWord
Dim foundItems As Object = indesignApplication.ActiveDocument.FindText()
For Each foundItem In foundItems
foundItem.FillColor = myColor
Next
