Skip to main content
Participant
November 4, 2019
Question

Get the text location in Pgf by Keyword

  • November 4, 2019
  • 2 replies
  • 344 views

Hi,

Help me in getting the text location of a keyword in a paragraph. Keyword may be name, place, etc.

I need to insert additional text after the keyword.  

I am not able to get the text location at end of keyword.

This topic has been closed for replies.

2 replies

Legend
November 5, 2019

This is a complicated task. Have you already located the keyword? If not, did you have a plan for how to do it? One way is with Search(), but it is not the only way. And a programmatic search is tricky.

 

I think we need more details. If you are starting from nothing, the best we can do is offer some pointers. We can't write the script for you, because it is not trivial. At least, speaking for myself.

 

Russ

LinSims
Community Expert
Community Expert
November 4, 2019

Maybe I'm missing something here, but why not just do a search for the keyword and then replace it with the keyword and the additional text? If the Change field isn't sufficient, you can find the first instance of the keyword, add the additional text, then copy the whole thing and from then on search and replace using the By Pasting option.

 

ETA: Whoops, sorry. Just saw that you were looking for a scripting solution. I can't help with that.