For Visual Studio 2008 and Visual Studio 2010:
1) Open VS, and on the Menu bar select "Tools...Macros...New Macro Project"
2) Call the project "GoogleSearchMSDN"
3) I'm so sorry about this, but VB is involved here. Not my fault, honest!
4) Rename the default
" - right click on the module name in the left hand pan, select "
5) Enter the following code as the module body:
Dim url As String
Dim searchFor As TextSelection = DTE.ActiveDocument.Selection()
If searchFor.Text <> "" Then
url = "www.google.com/search?q=MSDN+" + searchFor.Text
url = "www.google.com/search?q=MSDN"
6) Build and save your module.
7) Use the menu bar again: "Tools...Options...Environment...Keyboard"
8) In the "Show commands containing:" textbox, type "Google" - you should see your new macro.
9) Go to the "Press shortcut keys" box, and press F1
10) Press OK.
F1 now searches for "MSDN" plus whatever you highlighted.
Took out the "C#" reference in the "searches for" comment at the end - mine does, because I put that in the URL... :-O -- OriginalGriff [/edit]
Born at an early age, he grew older. At the same time, his hair grew longer, and was tied up behind his head.
Has problems spelling the word "the".
Invented the portable cat-flap.
Currently, has not died yet. Or has he?