VBA to select font/colour not working

Joined
Nov 28, 2017
Messages
2
Reaction score
0
Hi

I'm working in Word 2013 and want the user to be able to enter a symbol to represent the RAG traffic lights for risk system so they just click an icon on the quick access toolbar and it inserts a letter X, selects the letter X just typed, applies the Windings font, selects the character I want. It also needs to apply the color Red (I've not done this bit yet).

I would also need the color details to be able to do amber and green as well.

This is my ham-fisted (and patently) wrong - attempt so far for my macro entitled 'Red':
Sub Red()
'
' Red Macro
' Selection.TypeText Text:="X "
' Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
' Selection.Font.Name = "Wingdings"
' Selection.InsertSymbol Font:="Wingdings", CharacterNumber:=161, _
' Unicode:=True
End Sub
'

The one bit I'm totally up to speed with is how to make it show up on the quick access toolbar - that bit I do know!

My problem is that when I click the assigned button on the quick access toolbar, absolutely nothing happens. I'm happy to fiddle about in VBA but (clearly) no expert so any help received would be fab.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top