Re: macro command for cursor to jump to end of selection?

From: -Steve-Krause- (sk_at_dolby.com)
Date: 12/09/04


Date: Thu, 9 Dec 2004 13:43:29 -0800

Works for me. Thank you very much.
Steve

"Greg Maxey" <gmaxey@mvps.OscarRomeoGolf> wrote in message
news:O7woDJj3EHA.4004@tk2msftngp13.phx.gbl...
> Steve,
>
> I won't say that this can't be improved, but try:
>
> Sub ScratchMacro()
> With Selection
> With .Font
> .Italic = True
> .Color = wdColorRed
> End With
> .Collapse Direction:=wdCollapseEnd
> End With
> With Selection.Font
> .Italic = False
> .Bold = False
> .Color = wdColorBlack
> End With
> End Sub
>
>
> --
> Greg Maxey/Word MVP
> A Peer in Peer to Peer Support
>
> -Steve-Krause- wrote:
> > I have a very simple macro assigned to a button that takes
> > highlighted text and makes italic and red .
> >
> > Selection.Font.Italic = True
> > Selection.Font.Color = wdColorRed
> >
> > I have another macro assigned to a button that turn the text back to
> > my standard.
> >
> > Selection.Font.Italic = False
> > Selection.Font.Bold = False
> > Selection.Font.Color = wdColorBlack
> >
> > I have to highlight the text, push the red text button, then move the
> > cursor to the end of the selection and select the other button to
> > start typing in the black color.
> >
> > Is there a way that I can combine these two so that I don't have to
> > move the cursor manually?
> >
> > Steve Krause
> > sk@dolby.com
>
>