DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Can I open file such as (*.xls,*.doc etc) with vb ?

  1. #1
    Matty Guest

    Can I open file such as (*.xls,*.doc etc) with vb ?


    Can I open file such as (*.xls,*.doc etc) with vb ?

  2. #2
    Phil Weber Guest

    Re: Can I open file such as (*.xls,*.doc etc) with vb ?

    > Can I open file such as (*.xls,*.doc etc) with VB?

    Matty: You can open them as you would any other file, but if you want to
    extract meaningful data from them, you'll have to use Word or Excel or a
    third-party component that understand their file formats.
    ---
    Phil Weber



  3. #3
    Phil Weber Guest

    Re: Can I open file such as (*.xls,*.doc etc) with vb ?

    > Can I open file such as (*.xls,*.doc etc) with VB?

    Matty: You can open them as you would any other file, but if you want to
    extract meaningful data from them, you'll have to use Word or Excel or a
    third-party component that understand their file formats.
    ---
    Phil Weber



  4. #4
    Eric Quist Guest

    Re: Can I open file such as (*.xls,*.doc etc) with vb ?

    You can open them in their associated program with this API:

    Private Const SW_SHOWDEFAULT As Long = 10

    Private Const SE_ERR_NOASSOC As Long = 31

    Private Declare Function ShellExecute Lib "shell32.dll" Alias
    "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal
    lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String,
    ByVal nShowCmd As Long) As Long


    lRet = ShellExecute(hWnd, "Open", File, 0&, 0&, SW_SHOWDEFAULT)

    Another alternative to open them in your application is ta add the Internet
    Explorer control to the project and use that to show the files. This will of
    course demand that you client have Internet Explorer on their machines.

    Eric

    "Matty" <yutthasak@bangkokair.co.th> wrote in message
    news:390689af$1@news.devx.com...
    >
    > Can I open file such as (*.xls,*.doc etc) with vb ?




  5. #5
    Eric Quist Guest

    Re: Can I open file such as (*.xls,*.doc etc) with vb ?

    You can open them in their associated program with this API:

    Private Const SW_SHOWDEFAULT As Long = 10

    Private Const SE_ERR_NOASSOC As Long = 31

    Private Declare Function ShellExecute Lib "shell32.dll" Alias
    "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal
    lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String,
    ByVal nShowCmd As Long) As Long


    lRet = ShellExecute(hWnd, "Open", File, 0&, 0&, SW_SHOWDEFAULT)

    Another alternative to open them in your application is ta add the Internet
    Explorer control to the project and use that to show the files. This will of
    course demand that you client have Internet Explorer on their machines.

    Eric

    "Matty" <yutthasak@bangkokair.co.th> wrote in message
    news:390689af$1@news.devx.com...
    >
    > Can I open file such as (*.xls,*.doc etc) with vb ?




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center