This article is devoted to the editor in Word 2007 users who need to use the characters in words.
Unfortunately, the usual way to insert accents to the letters in the word in the editor in Word 2007 does not work, unlike previous versions of the text editor. But you can use the following macros, which are well equipped for this task in the new version of the editor. This macro allows installing accent marks over the highlighted letter, and remove the mark.
In Word word processor, there are several types of characters accents. As described macro I use sign with the code 769 from the table of characters Unicode.
ID macro:
Sub setAndDeleteAccent ()
'Add / Remove characters
'@ A. Kokin WordExpert.ru - professional work with text
Dim rAcc As Range
Dim rTmp As Range
Set rTmp = Selection.Range
If Selection.Type = wdSelectionIP Then
MsgBox prompt: = "Do not singled out the letter"
ElseIf Len (rTmp.Characters (1)) = 1 Then
rTmp.Collapse direction: = wdCollapseEnd
rTmp.InsertSymbol CharacterNumber: = 769, Unicode: = True
Selection.Collapse direction: = wdCollapseEnd
Else
For Each rAcc In rTmp.Characters
If AscW (Right (rAcc, 1)) = 769 Then
rAcc = Left (rAcc, 1)
End If
Next rAcc
End If
End Sub
To insert an accent over the letter, scroll to the letter and then run the macro. To remove the marks, again highlight the letter, under the emphasis. If the text was not identified, the message will be displayed in the dialog box.
To have quick access to the macro, assign a keyboard shortcut for it, or create a button on the toolbar (or the panel shortcuts for Word 2007).