There was a really interesting thread (that I'm sure isn't finished) in the newsgroups around .txt files and their somewhat odd behaviour opening in IE and not the associated program (Notepad for most of us peons). Here's the original message that sparked this thread:
What is the story behind the .txt files being overlooked when it comes to document libraries? Should all .txt files be converted to .doc files? It's a pain having to open them into IE, then 'Save as' to the desktop, open them with notepad, edit them, save them back to the desktop, then re-upload them to the document library. There is no version history with that method either. Why can't we open .txt files to an editor from within the document library? Is there some way in SharePoint to change the association for .txt files from IE to some editor?
I did some digging and found a few things that may help:
Microsoft KB Article:
Lengthy Article on File Associations (and mentiones IE and Text Files):
Contains "fixes" for file associations and includes one for text files:
The last link *might* fix the opening of .txt files (I tried it but just seems to repair any .txt file association problem) but the other problem is that you can't get the Office like integration with Notepad for example. It just isn't there so you're never going to see Notepad have a task pane and Check in options like Word does. Nor are you going to see too many non-MSOffice products have this feature either. The entire Microsoft suite of products is something that continues to alter each other in behaviour and how say a Word document has new "features" when you open it from a SharePoint site rather than a hard drive.
Some interesting stuff indeed. I did some digging and found a few more things.
<a href="document.doc" onclick="DispDocItemEx(this,'FALSE','FALSE','TRUE','SharePoint.OpenDocuments.2')">Word Document</a>
Okay, fair enough. How about a text file?
<a href="document.txt" onclick="DispDocItemEx(this,'FALSE','FALSE','FALSE','')">Text File</a>
Hmmm. Different parameters and there's no last parameter. Looking at OWS.JS we find this:
function DispDocItemEx(ele, fTransformServiceOn, fShouldTransformExtension, fTransformHandleUrl, strProgId)
//@if (@jscriptversion >= 5)
//@ vstsOpenDoc = new ActiveXObject(szProgId);
//@ vstrStsOpenDoc = szProgId;
//@ } catch(e)
//@ vstsOpenDoc = null;
//@ vstrStsOpenDoc = null;
So, walk with me on this one, suppose the commented out code invokes ActiveX on the client (IE) and launches the appropriate client side program? Is this the missing link to get .txt files to launch with the association they have on the desktop?
Also another thought is the order that .txt files are listed with their desktop associations. I looked at a few setups and default is that IE is first in the list, followed by others with Notepad mixed in there. Perhaps you can a) move Notepad higher up in the Association list chain [if there is such a thing] or b) delete IE as an association with .txt files altogether [who wants to open text files with IE]? Anyways, a few ideas around this mystery.
Unfortunately I don't have the resources to dig into this so hopefully someone out there will confirm or deny this and share with the rest of the class. Any takers or am I completely off my rocker here?