• How to distribute a self-made add-in?

    Author
    Topic
    #352802

    Hi,

    I made an Excel 97 add-in and a hlp Help-file. I want to distribute this throughout the company, for every Excel user. Both files should be put in the directory c:program filesmicrosoft officeofficelibrary where Excel looks for available add-ins at startup.
    Does anyone know how to make a installation procedure that does this? I mean, ideal should be if I could send around an “executable” file that starts an installation wizard that does the job. As an extra, if the add-in could become checked at the same time, this would be wonderful.
    I don’t expect you to come up with complete procedures, but it would be very much appreciated if you could give me some hints or references where I can find information on that.

    Viewing 3 reply threads
    Author
    Replies
    • #514318

      Would you mind telling me how you created the add-in and hlp files as I have some user-defined functions I would like to distribute as an addin

      thanks

      • #514337

        How you create an addin varies between versions of Excel. For Excel 97 & 2000 you create a workbook write the addin VBA code. Then you switch to the spreadsheet window for that workbook (not the VBA Editor window), and do a File | Save As. In the Save As dialog box, select addin from the “Save as file of type” drop down list (it should be the last item in the list). Type in your addin file name and save the file.

        For earlier versions, I think it was a menu item on the “Tools” menu in the VBA Editor window, but I am not sure I am remembering correctly.

        • #514367

          There are a few things which are worthwhile considering before you save your project as an xla-file (= add-in).
          First, in the VBE (Visual Basic Editor), in the project explorer, right-click the VBAproject and go to the protection tab. Lock your project for viewing and fill in and confirm your password. This will protect your add-in code from being viewed by other people.
          Second, goto File >> properties in the Excel environment and fill in a Title and Comments. The title will appear in the add-in available list when you select Tools >> Add-ins. The comment will appear in the comment box. Of course, you need to place your xla-file in the directory where Excel looks for add-ins at startup. This is e.g. c:program filesmicrosoft officeofficelibrary for Excel 97.

          • #514372

            Just want to add that you have to select the properties of the VBAproject before going to the protection tab (sorry for this..)
            About making hlp files, this is a little more complicated to explain, but I used the Microsoft Help Workshop to do it. Here you have some information on it:

            Help Workshop is a program that you use to create Help (.hlp) files, edit project and contents files, and test and report on help files. Help Workshop takes the information in the project (.hpj) file to combine the topic (.rtf) files (which can be made in Word), bitmaps, and other sources into one Help file that can be viewed using the Microsoft Windows Help program.

            Help Workshop

    • #514877

      I would use a dos batch file (*.BAT) or the NT equivalent (*.cmd) to copy the file from a common directory to each user’s directory. This file might be called from the logon script.

      How well this works depends on whether your workstations are all set up the same.

      • #515062

        Have you considered using WinZip to zip and create an executable? When zipping, specify to recurse folders. Then from the Action menu select “Create .exe file”.

        You can then email the file to your coworkers and when they unzip it will go into their respective Office directories.

    • #515139

      *** Geoff W. I’ve added the markup tags- Leif’s response shows you how ****
      Hi,

      I’ve got the url of an interesting website:
      click here
      There you can find software that enables you to distribute your files and programs via a setup wizard. A free trial version can be downloaded.
      Thanks to all of you for your suggestions.

      • #515141

        The url is: http://www.setupspecialist.com
        I tried to make a direct link using the href html-command, but that didn’t work. I often see people displaying links but I don’t know how to do this. Can someone help me with this?

    • #515313

      Hi HP,

      <>

      What I did was create an excel workbook with the following code in it:

      Option Explicit
      Dim vReply As Variant
      Dim AddInLibPath As String
      Dim CurAddInPath As String

      Sub Setup()
      Dim vReply As Variant
      Dim AddInLibPath As String
      Dim CurAddInPath As String
      vReply = MsgBox(“This will install YourAppsName” & vbNewLine & _
      “in your default Add-in directory.” & vbNewLine & vbNewLine & “Proceed?”, vbYesNo, “YourAppsName Setup”)
      If vReply = vbYes Then
      On Error Resume Next
      Workbooks(“YourAppsName.xla”).Close False

      CurAddInPath = ThisWorkbook.Path & “YourAppsName.xla”
      AddInLibPath = Application.LibraryPath & “YourAppsName.xla”
      On Error Resume Next
      FileCopy CurAddInPath, AddInLibPath
      If Err.Number 0 Then
      SomeThingWrong
      Exit Sub
      End If
      With AddIns.Add(FileName:=AddInLibPath)
      .Installed = True
      End With
      Else
      vReply = MsgBox(prompt:=”Install Cancelled”, Buttons:=vbOKOnly, Title:=”YourAppsName Setup”)
      End If
      End Sub
      Sub SomeThingWrong()
      vReply = MsgBox(prompt:=”Something went wrong during copying” & vbNewLine _
      & “of the add-in to your add-in directory:” _
      & vbNewLine & vbNewLine & Application.LibraryPath & “” _
      & vbNewLine & vbNewLine & “You can install YourAppsName manually by copying the file” _
      & vbNewLine & “YourAppsName.xla to this directory yourself and installing the addin” _
      & vbNewLine & “using Tools, Addins from the menu of Excel.” _
      & vbNewLine & vbNewLine & “Don’t press OK yet, first do the copying from Windows Explorer.” _
      & vbNewLine & “It gives you the opportunity to ALT-TAB back to Excel” _
      & vbNewLine & “to read this text.”, Buttons:=vbOKOnly, Title:=”Autosafe Setup”)
      End Sub

      Regards,

      Jan Karel Pieterse

      • #515400

        Thanks Jan Karel,

        But suppose you want to distribute your add-in via the mail? The most easy way to let another user install your add-in is just telling the person who receives the add-in and help file to which directory he or she should detach these files (e.g. to c:program filesmicrosoft officeoffice library, which is the directory where Excel looks for available add-ins at start-up). Then of course, after launching Excel, the user still has to check the checkbox next to the add-in in the available add-ins list (access via Tools >> Add-ins). Of course, this doesn’t look very professional.

        Thanks again, or as they say in Dutch: reuze bedankt!!

        • #515443

          Hi Hans,

          <>

          The code I wrote considers the fact, that international versions of Excel use different pathnames for storage of Add-ins (English: “…Library”, Dutch: “…Biblio”. As the Add-in I produced this code for is International, I had to do more than just write “please copy this and that file to to c:program filesmicrosoft officeofficelibrary”

          <> Add-ins).>>

          The code I provided “checks” that itself.

    Viewing 3 reply threads
    Reply To: How to distribute a self-made add-in?

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: