Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-14-2014, 09:29 AM
NobodysPerfect NobodysPerfect is offline Function to retrieve high value Unicode Windows 8 Function to retrieve high value Unicode Office 2010 32bit
Competent Performer
Function to retrieve high value Unicode
 
Join Date: Jan 2014
Location: Germany
Posts: 136
NobodysPerfect is on a distinguished road
Default

Hi,



it took quite some time, but at least I got it (hope so):

Code:
Function GetHValUnicode(ByVal sSource) As String
Dim sVal As String, i As Long

    sSource = Left(Trim(sSource), 2)
    For i = 1 To 2
        sVal = sVal & DecodeAscW(Mid$(sSource, i, 1))
        If i = 1 Then sVal = sVal & "|"
    Next
    GetHValUnicode = sVal

End Function

Function DecodeAscW(sChar)
Dim sAscVal As Long

    sAscVal = AscW(sChar)
    If sAscVal < 0 Then sAscVal = sAscVal + 65536
    DecodeAscW = sAscVal
    
End Function

Sub InsertOrSearchSegoeOISymbol()
Dim vNew As Variant, sSearch As String

    vNew = Split(GetHValUnicode(Selection), "|")
    ' type character
    Selection.InsertAfter ChrW(vNew(0)) & ChrW(vNew(1))
    ' create string for S&R
    sSearch = "ChrW(" & vNew(0) & ") & ChrW(" & vNew(1) & ")"

End Sub
Cheers
NP
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function to retrieve high value Unicode Save Word doc in unicode html (utf-8) rybrns Word 5 09-26-2011 02:18 PM
ANSI-ost to unicode-ost jeff13 Outlook 0 01-07-2010 11:48 AM
Unicode Big endian support Rose44 Excel 0 09-04-2009 11:59 PM
Function to retrieve high value Unicode Unicode Encoding Type Rose44 Excel 2 08-09-2009 09:05 PM
Unicode problem in Subject list salanalani Outlook 0 01-20-2006 12:48 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:30 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft