Skip to content

Instantly share code, notes, and snippets.

@dck-jp
Created January 21, 2015 07:55
Show Gist options
  • Select an option

  • Save dck-jp/d1b6a659512dd27b5e96 to your computer and use it in GitHub Desktop.

Select an option

Save dck-jp/d1b6a659512dd27b5e96 to your computer and use it in GitHub Desktop.
Googling Selection.Text using VAMIE.cls
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