Link to home
Create AccountLog in
Avatar of TSFLLC
TSFLLC

asked on

OpenFileDialog Issue - How to get file like (.doc, .xls) to open outside VB

I have the basic structure of an openfiledialog.

My filter is "All Files|*.*"
The folder could contain multiple file types. txt, doc, pdf, xls.

What is required to mirror the execution of one of these file types when double-clicking the file as occurs with Windows Explorer?

I don't seem be be getting there.
Dim pathToFolder As String = glRootDirectory & "\OtherWarrantyInfo"
        OpenFileDialog1.InitialDirectory = pathToFolder
        OpenFileDialog1.FileName = ""
        OpenFileDialog1.Filter = "All Files|*.*"
        OpenFileDialog1.RestoreDirectory = True
        OpenFileDialog1.Multiselect = False
        OpenFileDialog1.ShowDialog()
        If OpenFileDialog1.FileName = "" Then
            Exit Sub
        Else
            OpenFileDialog1.OpenFile()
        End If

Open in new window

SOLUTION
Avatar of MedievalWarrior
MedievalWarrior
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of TSFLLC
TSFLLC

ASKER

Sweet!!  Copy & Paste.

Thanks to both.  400 for full coding.