Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim document As Word.Document document = Globals.ThisAddIn.Application.ActiveDocument Dim FindObject As Word.Find = document.Application.Selection.Find With FindObject .ClearFormatting() .Text = "<*>" .MatchWildcards = True .Replacement.ClearFormatting() .Replacement.Text = Accentuate.Accentuate.DoAccentuate(document.Application.Selection.Text) .Execute(Replace:=Microsoft.Office.Interop.Word.WdReplace.wdReplaceAll) End With End Sub
Public Class Accentuate Shared Current_Word As String Public Shared Function DoAccentuate(ByVal s As String) As String Dim Accented_word As String Current_word = s Accented_word = Current_word & "ǽ" DoAccentuate = Accented_word End Function End Class
DoAccentuate
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)