Re: macro command for cursor to jump to end of selection?
From: Greg Maxey (gmaxey_at_mvps.OscarRomeoGolf)
Date: 12/09/04
- Previous message: -Steve-Krause-: "macro command for cursor to jump to end of selection?"
- In reply to: -Steve-Krause-: "macro command for cursor to jump to end of selection?"
- Next in thread: -Steve-Krause-: "Re: macro command for cursor to jump to end of selection?"
- Reply: -Steve-Krause-: "Re: macro command for cursor to jump to end of selection?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 9 Dec 2004 16:01:35 -0500
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
- Previous message: -Steve-Krause-: "macro command for cursor to jump to end of selection?"
- In reply to: -Steve-Krause-: "macro command for cursor to jump to end of selection?"
- Next in thread: -Steve-Krause-: "Re: macro command for cursor to jump to end of selection?"
- Reply: -Steve-Krause-: "Re: macro command for cursor to jump to end of selection?"
- Messages sorted by: [ date ] [ thread ]