Replace Text with nothing crashed?

 Hi,

This seems to be broken in recent versions.

I get an exception when replacing text with an empty string.

Replace(string given, string replace, bool caseSensitive, bool wholeWord)

code in vb:

wd.Replace(find, nothing, False, True)

wd.Replace(find, vbnullstring, False, True)

Error: The object reference not set to instance...

Image

Please check this and is there a way to fix?


Thanks you!


2 Replies

JA jamin August 30, 2024 06:17 AM UTC

Hi,

This finally worked. I thought they were the same.

wd.Replace(find, "", False, True)



MA Maryline Atieno Nyanjong’ Syncfusion Team August 30, 2024 07:02 AM UTC

Hi Jamin,

We are glad that your issue has been resolved. Please get back to us if you need any other assistance. We are happy to assist as always.

Regards,

Maryline A.


Loader.
Up arrow icon