Results 1 to 4 of 4

Thread: Word and Excel not installed on machine

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    63

    Question Word and Excel not installed on machine

    Hail to All,

    I was wondering is there any way to open and read and write and save to Excel and word documents in a program if the machine that is being run on does not have either of thies apps installed. Are there files that I can include in my application that it could be worked on in my application and not need word or excel?

    Thanks for all your help

    Mythos

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Word and Excel not installed on machine

    No you will need these programs on the system.

  3. #3
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: Word and Excel not installed on machine

    I don't know the code, but there is a way to see if the computer your application is being installed on has those applications installed.

    I'm sure you can Google it and find it.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Word and Excel not installed on machine

    I use something like this
    vb.net Code:
    1. Imports Microsoft.Win32
    2. Public Class Form1
    3. Public Function IsAppInstalled(ByVal AppName As String) As Boolean
    4.         Dim strSubKey As String = String.Empty
    5.         Select Case AppName.ToUpper
    6.             Case "ACCESS"
    7.                 strSubKey = "Access.Application"
    8.             Case "EXCEL"
    9.                 strSubKey = "Excel.Application"
    10.             Case "WORD"
    11.                 strSubKey = "Word.Application"
    12.         End Select
    13.  
    14.         Dim objKey As RegistryKey = Registry.ClassesRoot
    15.  
    16.         Dim objSubKey As RegistryKey = objKey.OpenSubKey(strSubKey.ToUpper)
    17.  
    18.         Return Not objSubKey Is Nothing
    19.  
    20.         objKey.Close()
    21.  
    22. End Function
    23.  
    24. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    25.         If IsAppInstalled("Excel") = True Then
    26.             MessageBox.Show("Yep, it is here")
    27.         Else
    28.             MessageBox.Show("Nope...you gotta install it.")
    29.         End If
    30. End Sub
    31. End Class

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width