MS Word? Next Ben Domenech? What?
It happened so long ago, but remember when Oregon guy outed Ben as a plagiarist? A flurry of Google activity ensued as more and more examples of Ben's intransigence flooded the blogosphere.
Are you fairly proficient with Word? Do you know how to run macros? Or do you want to learn how?
I'll explain the relationship between Ben and Word below the fold.
First diary. Be gentle.
That flurry of Google activity was damned effective. But, as the President says, "it's work--it's hard work." You have to paste some text from Ben's articles into Google and search. You have to do it for paragraph after paragraph and article after article.
That got me thinking. Wouldn't it be nice to have a tool that would run a Google search on, say, the first sentence in every paragraph of a Domenech document. A lot of folks must have access to Word. I had already written myself a little Word add-in that lets me select a range of text and click a button to run a Google search, so I figured it wouldn't be hard to expand on that functionality. Just paste a Web page into a Word doc and run this bad boy. If you're interested, here it is.
A couple of caveats come first, though.
- The paragraphs must be created by actual paragraph markers. A lot of Web pages use line feeds. That's no good--Word thinks the document is one big paragraph. How do you know which whether the document has line feeds or paragraph marks? Click the show all characters button (the backward P with two descenders or press Ctrl+Shift+8). If the paragraphs end with an arrow pointing down and to the left, that's a line feed. How do I replace those line feeds with paragraph marks? Open the replace dialog. In the find what field enter ^l (lower case L). In the replace field enter ^p. Replace all.
- This macro will open an instance of IE for the first sentence of every paragraph in the document. I wouldn't be running this on long documents.
- For Firefox users, comment out or delete the Shell statement for iexplore.exe and remove the single quotation mark in front of the Shell statement for Firefox.exe. You may have installed Firefox to a different folder than I did, but it's unlikely.
- Tested on Windows only. I fairly certain this will not work for Word for Mac users.
Sub CheckEmOut()
' By DoLooper to smoke out future Domenechs, or for any purpose you like.
Dim oPar As Paragraph
Dim strSearch As String
For Each oPar In ActiveDocument.Paragraphs
strSearch = oPar.Range.Sentences("1").Text
strSearch = Replace(strSearch, """", "%22", 1, , vbTextCompare)
strSearch = Replace(strSearch, " ", "+", 1, , vbTextCompare)
strSearch = "http://www.google.com/search?hl=en&q=" & strSearch
Shell "c:\program files\internet explorer\iexplore.exe " & strSearch
' Shell "c:\Program Files\Mozilla Firefox\Firefox.exe " & strSearch
Next
MsgBox "Done"
End Sub
Enjoy.