Thread: [Solved] I need a slashed zero
View Single Post
 
Old 01-17-2019, 05:11 AM
Grumpy Grumpy is offline Windows 10 Office 2016
Novice
 
Join Date: Jan 2019
Posts: 2
Grumpy is on a distinguished road
Default Nukedaddy's Slashed Zero

Since most of the solutions suggested are based on using an “O” character, none are really suitable. I had the same problem some time ago and solved it using a combination of the “Ctrl+F9” method and a short macro. This will work with whatever font you are using and can be added to the Ribbon or the Quick Action Toolbar as you chose.

************************************************** ******************

Sub SlashedZero()
'
'Insert SlashZero
'
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
Text:="EQ \o (0,/)", PreserveFormatting:=False
'
' Remove the extra space that is inserted in the field.
'
ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes
Selection.MoveLeft Unit:=wdCharacter, Count:=2
Selection.Delete Unit:=wdCharacter, Count:=1
'
' Move insertion point to the right of the field.
'
ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes
Selection.MoveRight Unit:=wdCharacter, Count:=1
End Sub

************************************************** ******************