Google Dictionary for Word

GD4Word (Google Dictionary for Word) 只做一件事:选中一个单词,按下CTRL+ALT+D,即打开Google Dictionary 窗口,显示该单词的定义、翻译和例句。

GD4Word 是一个 Word 宏程序,仅可 Microsoft Word 中使用。

GD4Word 是 Google Translate for Translators的免费版本,GT4T 将 Google Translate 融合进了 TRADOS、Word 及所有基于文本的应用,可大大提高翻译速度。


GD4Word

点击下载安装程序会自动将快捷键Ctrl + Alt + D添加到您的Word中。

如果您想要自己编码:

在Word 2003下,

转到工具–>宏—>Visual Basic

右键单击 “Normal”, 并选择”Insert”—>”模块”

将以下代码粘贴到新插入的模块。

'code start

Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
 
Sub Gdictionary()
 
Dim SLan As String
Dim TLan As String
Dim SText As String
Dim Gurl As String
 
SLan = "en"
TLan = "zh-CN"
SText = VBA.Trim(VBA.Replace(Selection.Text, Chr(13), ""))
 
Gurl = "http://www.google.com/dictionary?langpair=" + SLan + "|" + TLan + "&q=" + SText + "&hl=en&aq=f"
 
Debug.Print Gurl
 
ShellExecute 0&, vbNullString, Gurl, vbNullString, vbNullString, vbNormalFocus
 
End Sub
 
'code end

然后,您可以为宏Gdictionary()指定键盘快捷键。

此代码在源语言使用ASCII字符进才能用。 如果你想用来做汉译英时,您需要为UTF – 8编码的源文本字符串。

“en”, “zh-CN” 为源语言和目标语言简码。 您需要将其更改为您的语言对。

谷歌语言短代码:

auto=Auto Detect,af=Afrikaans,sq=Albanian,ar=Arabic,be=Belarusian,bg=Bulgarian,ca=Catalan,zh-CN=Chinese (Simplified),zh-TW=Chinese (Traditional),hr=Croatian,cs=Czech,da=Danish,nl=Dutch,en=English,et=Estonian,tl=Filipino,fi=Finnis h,fr=French,gl=Galician,de=German,el=Greek,iw=Hebrew,hi=Hindi,hu=Hungarian,is=Icelandic,id=Indonesia n,ga=Irish,it=Italian,ja=Japanese,ko=Korean,lv=Latvian,lt=Lithuanian,mk=Macedonian,ms=Malay,mt=Malte se,no=Norwegian,fa=Persian,pl=Polish,pt=Portuguese,ro=Romanian,ru=Russian,sr=Serbian,sk=Slovak,sl=Sl ovenian,es=Spanish,sw=Swahili,sv=Swedish,th=Thai,tr=Turkish,uk=Ukrainian,vi=Vietnamese,cy=Welsh,yi=Y iddish
是一个免费版本的“