Question : Loading rtf files into unknown application from WWW

I have some VBScript code that will load a file into word. Where strLocation is a fully resolved file name

Function OpenDoc(strLocation)
    Dim objWord
    Set objWord = CreateObject("Word.Application")
    objWord.Documents.Open strLocation
    objWord.Visible = true
End Function

OK. Now, if I am using an rtf is there any way to get windows to open the rft into its default application without knowing what the application is. Eg I will link to mydoc.rtf and it will open in Word or Wordpad or Wordperfect or whatever the default is from windows explorer.

Now, the reason I want to do this is that the file formatting is routed if I allow the file to be opened into Internet Explorer. I want my customers to be able to see the file as originally intended.

Thanks for your help.

BTW any solution involving HTML, vbscript, javascript, cgi or whatever is fine.

Answer : Loading rtf files into unknown application from WWW

Why not let users download file and open it locally? Also, I doubt Explorer will display (and esp print it properly anyway). Now since you want to open it in DEFAULT app, and Wrod happens to be it, then it would be it. Or may be I misunderstood something
Random Solutions  
 
programming4us programming4us