|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
本帖最后由 liucqa 于 2012-2-22 14:40 编辑
联网,点击第一列单词,附件在3楼
网站有的时候比较慢,耐心等候
Sub getTranslator(wordkey As String)
'//单词翻译
Range("b:b").Offset(, 1).Clear
Dim sc As New SoapClient30
sc.MSSoapInit "http://fy.webxml.com.cn/webservices/EnglishChinese.asmx?wsdl"
Dim re
re = sc.TranslatorString(wordkey)
re(4) = "http://fy.webxml.com.cn/sound/" & re(4)
Dim i
Dim str As String
If re(3) = "Not Found" Then
str = "单词未找到"
Else
For i = 1 To 3
If re(i) <> "" Then str = str & "【" & re(i) & "】"
Next
End If
If str = "单词未找到" Then
ActiveCell.Offset(, 1).Font.ColorIndex = 5
Else
Call MMPlay(CStr(re(4)))
ActiveCell.Offset(, 1).Clear
ActiveCell.Offset(, 1) = str
End If
End Sub
|
评分
-
1
查看全部评分
-
|