J
Jack Sons
Hi all,
Long ago I found a macro (see below) for overlining characters, but it never
worked. When executed a box pops up in which the to be overlined character
is to be typed. When I type, say, M the result is not an overlined M but "M"
followed by "," and after that a kind of opposite of underscore, what I
would call overscore. That combination is one "thing" that is marked in grey
(highlighted). It appears to be the representation of a field:
{EQ\o(M,{EQ \s\up 10(_)})}
I use XP SP2 with W2K
Anybody who knows wat goes wrong or how the macro should be corrected?
Jack Sons
The Netherlands
--------------------------------------------------------------------------------------
Sub Overline()
Dim sChar As String
sChar = InputBox("Enter character to overline", "Overline")
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=2
Selection.TypeText Text:="EQ \o(" + sChar + ",)"
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=2
Selection.TypeText Text:="EQ \s\up10(_)"
Selection.Fields.ToggleShowCodes
Selection.MoveLeft Unit:=wdCharacter, Count:=2
Selection.Fields.ToggleShowCodes
End Sub
Long ago I found a macro (see below) for overlining characters, but it never
worked. When executed a box pops up in which the to be overlined character
is to be typed. When I type, say, M the result is not an overlined M but "M"
followed by "," and after that a kind of opposite of underscore, what I
would call overscore. That combination is one "thing" that is marked in grey
(highlighted). It appears to be the representation of a field:
{EQ\o(M,{EQ \s\up 10(_)})}
I use XP SP2 with W2K
Anybody who knows wat goes wrong or how the macro should be corrected?
Jack Sons
The Netherlands
--------------------------------------------------------------------------------------
Sub Overline()
Dim sChar As String
sChar = InputBox("Enter character to overline", "Overline")
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=2
Selection.TypeText Text:="EQ \o(" + sChar + ",)"
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=2
Selection.TypeText Text:="EQ \s\up10(_)"
Selection.Fields.ToggleShowCodes
Selection.MoveLeft Unit:=wdCharacter, Count:=2
Selection.Fields.ToggleShowCodes
End Sub