avkokin
Wed Sep 12 14:55:25 CDT 2007
On 12 , 07:30, avkokin <avko...@gmail.com> wrote:
> On Sep 11, 5:59 pm, "Graham Mayor" <gma...@REMOVETHISmvps.org> wrote:
>
>
>
>
>
> > If you use a Greek Keyboard layout in Windows the accent key is located in
> > the position of the semi colon key on an English keyboard. It is easier to
> > type the word correctly in the first place that to use vba to change it
> > afterwards, however to do so with your macro, you need to move the cursor to
> > the end of the selected character *before* adding the accent.
>
> > With Selection
> > .MoveRight Unit:=wdCharacter, Count:=1
> > .InsertSymbol Font:="Times New Roman", CharacterNumber:=769,
> > Unicode:=True
> > End With
>
> > or using collapse
>
> > With Selection
> > .Collapse direction:=wdCollapseEnd
> > .InsertSymbol Font:="Times New Roman", CharacterNumber:=769,
> > Unicode:=True
> > End With
>
> > --
> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> > Graham Mayor - Word MVP
>
> > My web sitewww.gmayor.com
> > Word MVP web site
http://word.mvps.org
> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
> > avkokin wrote:
> > > Hi. How can insert acute accent for selection of character into word?
> > > For example, I inserting acute accent like this:
>
> > > Selection.InsertSymbol Font:="Times New Roman",
> > > CharacterNumber:=769, Unicode:=True
>
> > > But it replace my selection character. If I add:
>
> > > Selection.Collapse direction:=wdCollapseEnd
>
> > > That nothing do.
>
> > > There is screenshot that show what I want:
> > >
http://img.photobucket.com/albums/v190/baston/toaccent.gif
>
> > > P.S. Acute accent is diacritical mark.- Hide quoted text -
>
> > - Show quoted text -
>
> Yes, Thank you. It's work. But why my variant (with Collapse) don't
> worked? mysticism...- -
>
> - -
I have next code:
Sub accent()
Dim selChar As Long
selChar = AscW(Selection.Range.Characters(1))
If Selection.Type = wdSelectionIP Then
MsgBox prompt:="Nothing selection", Title:="Select a character"
Else
' How delete accent mark?
With Selection
.Collapse direction:=wdCollapseEnd
.InsertSymbol CharacterNumber:=769, Unicode:=True
End With
End If
End Sub
Now I need delete Character (769) from selection text (if it exist).
How I can delete it?