PDA

View Full Version : unicode number problem



jsanraj
05-18-2011, 03:33 AM
I have to find character code number and have to apply corresponding symbol character through macro. I have a list of character code numbers in a text file.

example:
For Beta symbol, i have recorded a macro and found the below line.

Selection.InsertSymbol Font:="Times New Roman", CharacterNumber:=946, Unicode:=True

It will automatically insert a Beta symbol at the selected text.

But, i have only character code (unicode value) "03B2" for Beta.

The unicode value of Beta can be find be selecting Insert -> Symbol Menu and select "Times New Roman" font and select Beta character.

Anybody please help me to fix the problem.

Thanks in advance.

Paul_Hossler
05-18-2011, 10:09 AM
Try this


Option Explicit

Sub drv()
Call InsertUnicode("03B2")
Call InsertUnicode("03B3")
Call InsertUnicode("03B4")
Call InsertUnicode("03B5")
Call InsertUnicode("03B6")

End Sub

Private Sub InsertUnicode(U As String)
Selection.TypeText Text:=U
Selection.ToggleCharacterCode
End Sub



Paul

jsanraj
05-20-2011, 08:27 AM
Thanks for the code. I have used the code which is short and halpful.