running applications in VB 6.0
-
:((Hello everybody... i need help in running applications other than exe files using visual basic 6.0 i.e. if i want to open a .doc document using visual basic depending on the user chosen from the open dialog box not statically shell("c:\program files\office\word.exe c:\mydoc.doc") this opens always the same document.. this is not what i need. i want the user to browse his computer for certain files extensions on his harddrive and when he chooses the file it opens. P.S. the program must work for only one extension... thank you very much adnan madi
-
:((Hello everybody... i need help in running applications other than exe files using visual basic 6.0 i.e. if i want to open a .doc document using visual basic depending on the user chosen from the open dialog box not statically shell("c:\program files\office\word.exe c:\mydoc.doc") this opens always the same document.. this is not what i need. i want the user to browse his computer for certain files extensions on his harddrive and when he chooses the file it opens. P.S. the program must work for only one extension... thank you very much adnan madi
in vb6 : Add the Microsoft Common Dialog Control to the components then add the control to the form
CommonDialog1.Filter = "Doc|*.doc" CommonDialog1.ShowOpen shell c:\program files\office\word.exe" & CommonDialog1.FileName
you better also check if the user click cancel by checking the length ofCommonDialog1.FileName