Skip to main content
Participant
June 11, 2024
Question

Find text at the corner of the margin.

  • June 11, 2024
  • 1 reply
  • 154 views

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

This topic has been closed for replies.

1 reply

Community Expert
June 12, 2024

What exactly do you mean by "corner of the margin"? Can you explain via some screenshot?

-Manan

-Manan