moongodess Posted December 30, 2004 Posted December 30, 2004 How can I open a chm file? I tried the following: Quote Dim strFile As String strFile = Application.StartupPath & "\help.chm" If (System.IO.File.Exists(strFile) = True) Then System.IO.File.Open(strFile, IO.FileMode.Open End If but nothing happened :( Does anyone knows what am I doing wrong or if there is another way to open this kind of files? Quote
Leaders dynamic_sysop Posted December 30, 2004 Leaders Posted December 30, 2004 you won't actually open the file ( so as to see it ) using File.Open , you need to use Process.Start to do that , eg: Dim strFile As String strFile = Application.StartupPath & "\help.chm" If (System.IO.File.Exists(strFile)) Then System.Diagnostics.Process.Start(strFile) '/// launch the chm file to view it. End If Quote
moongodess Posted January 3, 2005 Author Posted January 3, 2005 Now, with that code, I got the attached error.. Says something like: 'Its not possible to open the file: mk:@MSITStore:[FilePath\FileName]' :confused: Does someone have any other idea? error.bmpFetching info... Quote
Leaders dynamic_sysop Posted January 3, 2005 Leaders Posted January 3, 2005 well in that path , you seem to have a \ missing , shouldn't it be HOST\ then the file name. Quote
moongodess Posted January 3, 2005 Author Posted January 3, 2005 No, the file name really is 'HOSTGestaoPontos.chm'. But now I know what was going on.. It was related to the permissions.. I change some things in file properties, and now it works fine. Thankx a lot for your help ;) For someone who need.. Here is the code: Quote Dim strFile As String strFile = Application.StartupPath & "\" & mstrFileName If (System.IO.File.Exists(strFile) = True) Then System.Diagnostics.Process.Start(strFile) End If Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.