VBA RegExp causes Compile error while vbscript.regexp works

Probably only missing some dependencies, meaning some references should be added.

Go to Tools -> References -> Find & check the "Microsoft VBScript Regular Expressions" (1.0 or 5.5 both work for me).


I know this question was already successfully answered, I just wanted to add a solution that worked for me.

Tools -> References - > "Microsoft VBScript Regular Expressions 5.5" was already activated.

Set regex = New RegExp caused a compile error.

Set regex = New VBScript_RegExp_55.RegExp works.

Tags:

Regex

Vba

Outlook