Script to delete extra characters

  • Last Post 05 December 2018
HeeeL posted this 04 December 2018

Good day!

Maybe someone will tell, faced with the problem of extra characters. When finding elements (in this case, areas) capture small parts of other words, because of this, the "* |; +" symbol appears. Maybe someone knows the script, because I couldn’t find it on my own, allowing me to delete these characters while recognizing them in the necessary element? Thank you very much, I will be very grateful!

Order By: Standard | Newest | Votes
ilya evdokimov posted this 04 December 2018

 Your AutoCorrect script should work any time, not when clicked.

Here is a more powerful Rule Script (VBscript) that can replace automatically various specified characters in all fields added to the rule.

Dim i

For i = 0 to me.Fields.Count - 1

  Dim inVal

  inVal = me.Fields.Item(i).Text

  inVal = Replace(inVal, chr(10), "")    'removes line feed/line break

  inVal = Replace(inVal, " ", "")            'replaces space with nothing

  inVal = Replace(inVal, "$", "")           'replaces $ with nothing

  me.Fields.Item(i).Text = inVal



Ilya Evdokimov WiseTREND

HeeeL posted this 04 December 2018

Thanks a lot! But I get an error, do not know what the problem is?

Attached Files

ilya evdokimov posted this 04 December 2018

We can't help without knowing what the error is and where it happens.

Ilya Evdokimov WiseTREND

Ekaterina posted this 05 December 2018

Sorry, there is too little information in the error message that you've provided. If you want to go on with the Rule script, could you please upload your project with some typical documents on a file share and describe us what fields should be corrected.

Otherwise you may try to use the Autocorrection script:
or set up the datatype (based on alphabet or regular expression) that will try to recognize words without wrong symbols