GUI search dialog's matching behavior in Office apps is not customizable. But if I were in your shoes, here's how I'd solve the problem:
First, you'll need some .NET code which performs accent-insensitive searches. Depending on which language you like best, here's both a VB and C# sample. The core of this is using the CompareInfo.IndexOf
method using a CompareOptions parameter set to CompareOptions.IgnoreNonSpace
. This is an accent-insensitive search.
Next, you'll need to call this code from the Office app. How you plug code in varies by app-- for example, here are blog posts showing how to do this from Excel and Access.
Then you'll need to wrap those calls around code and UI which simulates a search and replace. This again will be different in each app. For example, in Excel you'll loop through all cells in the current worksheet and look for matches using your code.
Finally, you'd want to map that code to a toolbar button or other way to get your code invoked.
Anyway, hope this is enough info to help you get started. Here's the core .NET code in either VB or C# to do accent-insensitive matches:
VB
Module Module1
Sub Main()
' returns: 3
Dim pos As Integer = FindIgnoreDiacritics("àcçëñt-énäblêd", "en")
End Sub
Function FindIgnoreDiacritics(ByVal lookIn As String, ByVal lookFor As String) As Integer
FindIgnoreDiacritics = System.Globalization.CultureInfo.InvariantCulture.CompareInfo.IndexOf(lookIn, lookFor, System.Globalization.CompareOptions.IgnoreNonSpace Or System.Globalization.CompareOptions.IgnoreCase)
End Function
End Module
C#
class Program
{
static void Main(string[] args)
{
// returns: 3
int pos = FindIgnoreDiacritics("àcçëñt-énäblêd", "en");
}
static int FindIgnoreDiacritics(string lookIn, string lookFor)
{
return System.Globalization.CultureInfo.InvariantCulture.CompareInfo.IndexOf(lookIn, lookFor,
System.Globalization.CompareOptions.IgnoreNonSpace | System.Globalization.CompareOptions.IgnoreCase);
}
}