![]() |
|
#1
|
|||
|
|||
|
I know this is probably the most basic thing to do for the programming savvy people but I need a macro to type the word " (source)" with a highlight formatting thanks |
|
#2
|
||||
|
||||
|
Code:
With Selection
.Text = " (source)"
.Range.HighlightColorIndex = wdYellow
.Collapse 0
.Range.HighlightColorIndex = wdAuto
End With
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
#3
|
|||
|
|||
|
thanks, but is there another way when I press undo (ctrl+z) it undoes it all at once?
I tried the script but it seems that I have to press undo 2-3 times before i can delete it completely to be specific I want it to act like im pasting (ctrl+v) the word " (source)" with highlight without copying every time I start a new session |
|
#4
|
||||
|
||||
|
You could be create an autotext entry with the text preformatted and insert that. Then insertion would be one action only.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Macro in Word to track colour of highlighted text
|
BABZ | Word VBA | 1 | 01-09-2017 10:33 PM |
| Word 2013: scrollbar & highlighted text too pale to see well | mascott3 | Word | 0 | 10-22-2014 12:55 AM |
how keep word document highlighted when switching focus to another application?
|
dylansmith | Word | 4 | 05-08-2013 01:21 AM |
| Word 2003 menu unusable until text is highlighted | goude | Word | 3 | 05-30-2012 03:36 PM |
Word typing problem
|
zacknember | Word | 2 | 06-10-2009 11:53 PM |