如何作繁簡字體轉換

出自VFP Wiki

跳轉到: 導航, 搜尋


用Word

繁簡字體轉換 ( 透過 Word 物件 )

Procedure TranslateTS
    lparameter strData
    local objWord
    local strResult
    objWord = CreateObject("Word.Document")
    with objWord
        .Content = strData
        .Range.TCSCConverter bytOption, True, True
        strResult = .Content
        .Close False
    EndWith
    return strResult
endproc