Created
January 21, 2015 07:55
-
-
Save dck-jp/d1b6a659512dd27b5e96 to your computer and use it in GitHub Desktop.
Googling Selection.Text using VAMIE.cls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub JumpWithGoogle() | |
| Dim ie As New VAMIE | |
| ie.Visible = True | |
| Dim q: q = URLEncode(Selection.text) | |
| ie.Navigate "https://www.google.co.jp/?q=" & q | |
| End Sub | |
| Function URLEncode(ByVal strOrg As String) As String | |
| With CreateObject("ScriptControl") | |
| .Language = "JScript" | |
| URLEncode = .CodeObject.encodeURI(strOrg) | |
| End With | |
| End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment