[dba-VB] Open PDF file

Gustav Brock Gustav at cactus.dk
Mon Nov 26 07:43:24 CST 2007

Hi David

This works for me having Acrobat Reader as the default viewer in Windows:

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim runPdf As New System.Diagnostics.Process
        Dim fileName As String = "c:\test.pdf"

        runPdf.StartInfo.FileName = fileName
        runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal

        runPdf = Nothing
    End Sub


>>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>>
I am using VS 2005 and VB.Net for a web site.

I have a number of PDF files that are stored in a static folder on the server.

Users select from a list on files on a web page and I want to open 
the files in Adobe.  Adobe reader is installed on the server.

Can anyone give me a pointer to how I can take a string with path and 
file name, and open it?


David Emerson
Dalyn Software Ltd
Wellington, New Zealand 

More information about the dba-VB mailing list