Deleting consecutive points if one of the points is in a field

17 Views Asked by At

I write texts that I can print in an anonymised version. I do this using field codes that look like this:

Ask Mister { IF { DOCPROPERTY Anonymous } = "N" "Tucker" "T." }

Which in the anonymized text version would look like this:

Ask Mister T.

The problem is that if the anonymous code comes at the end of the sentence, I get double points:

Ask Mister T..

Each sentence can only have one dot at the end. So I want to delete the first one of the doubles in the version shown, i.e. the one the field code shows, preferably without changing the field code.

I can do this manually, by simply positioning the cursor after the T and deleting the first dot. The advantage is that I only have to refresh the field to undo it.

But I would like to have this done automatically, either by a search and replace, or by a macro.

Unfortunately, I'm getting nowhere. I cannot even find the double points using the search function. (Search .. returns no hits). Other tricks like ^d. or ^21. do not work either.

No doubt one of you will come up with an easy way to do this.

Thanks a lot

Willem

0

There are 0 best solutions below