As you know, Books Online is available in two convenient locations. It's online as part of the MSDN Library, and it's offline as a Document Explorer help collection. Topics are accessible by URIs in each, but the URIs don't match. For example:
A while ago, another MVP said it would be nice for "local" Books Online to have a "find this page on the web" link. Local Books Online is usually faster and more convenient, but for blog, newsgroup, or forum posts, it makes more sense to paste in MSDN Library links, so they're clickable from the reader's browser. Alan Brewer of the SQL Server Documentation Team provided a helpful tip: MSDN will understand the GUID from the local Books Online link and redirect your request.
In other words,
Books Online Topic: CREATE STATISTICS (Transact-SQL)
Document Explorer URI: ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/b23e2f6b-076c-4e6d-9281-764bdb616ad2.htm
Alternate MSDN Library URI: http://msdn.microsoft.com/en-us/library/b23e2f6b-076c-4e6d-9281-764bdb616ad2.aspx
So I wrote this Javascript applet that works from inside local Books Online to put the Alternate MSDN Library URI on the Windows clipboard:
javascript:(function(){window.clipboardData.setData("Text","http://msdn.microsoft.com/en-us/library/" + location.pathname.slice(-40,-4) + ".aspx");})();
I also found a handy place to install it. I set it as Document Explorer's "Search Page" URL, which you can specify from local Books Online under Tools->Options. There was already a toolbar button in Books Online for Web Browser Search (a globe with binoculars). Now when I click on it, an MSDN Library URL of the Books Online article I'm reading is on my clipboard, ready to paste anywhere. (I don't use Books Online for web browser searches, and I'm guessing neither do you, so nothing is lost by redefining this button.)
Pretty cool, I thought. Until Alan quickly added that MSDN doesn't always understand and correctly redirect the URL-with-GUID. In particular, not for local Books Online pages that describe the managed API. So I did some quick and dirty guess-and-test bookmarklet development, and this is what I ended up with. Based on limited testing, it works on "regular" SQL Server topics as well as managed API ones.
javascript:(function(){var s = document.getElementsByTagName('head').item(0).innerHTML; var p = s.search("AssetID"); s = s.substr(p+16); p = s.search("\""); s = s.slice(0,p); p = s.search(":"); if (p>-1) s = s.substr(p+1); window.clipboardData.setData("Text","http://msdn.microsoft.com/en-us/library/" + s.toLowerCase() + ".aspx");})();
The bookmarklet is a Javascript program, so you could enhance it further to do all kinds of useful things. For example, clicking on the globe could raise a dialog where you pick a language (to replace en-us in my bookmarklet), and copy the language-specific URL to the clipboard.
With luck, this bookmarklet will be useful to a few readers, not to mention do some bookmarklet evangelism.