Results 1 to 6 of 6

Thread: Deploying Add-ins in a Network Environment

  1. #1

    Deploying Add-ins in a Network Environment



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi,

    I was just using the method described at Deploying Add-ins in a Network Environment to deploy an xlam add in.

    I wanted to check the means of saving the xlam back to the development path as I think I may be misunderstanding what is happening, or why it is happening.

    I get an error on
    (.SaveAs Filename:=strAddinDevelopmentPath & .Name, _
    ReadOnlyRecommended:=False)

    Runtime error 1004: This extension can not be used.

    I tried setting to this worksheet is an addin = true but it gave same error, tried to add FileFormat:=55 (I think 55 is xlam?) but get a compile error.

    I guess my question is 2, how do I get round that? But also, if I take out the lines
    ( .SaveAs Filename:=strAddinDevelopmentPath & .Name, _
    ReadOnlyRecommended:=False)

    It still seems to save my xlam on the development path from the .save line above.

    Thanks in advance for any pointers.

  2. #2
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,294
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    Hi Wulluby,

    This is interesting... I know that this routine was tested, as I used it for years. I just tested in 2010 though, and I'm getting the same error.

    Looking at the logic, the addin gets saved, then a copy is saved elsewhere. So there's really no reason to do a SaveAs over the old version, just a save will suffice. I stepped through the code just to make sure, and the path of the development path is preserved throughout.

    So I'd recommend deleting that SaveAs line.

    Thanks for mentioning this... I'll fix up the article!
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  3. #3
    It's a perfect piece of code for what I need deployment wise too, thanks for sharing it.

    Has anyone ever come up with a batch file or something that would add the addin automatically at the user end? You know how people are, if you tell 10 people to use the 'No' option when prompted to save a local copy, at least 1 will be to busy to notice that.

  4. #4
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,294
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    I know that some of my colleagues use InnoSetup to script the install. I've never tried it myself, but I hear it works well.

    Only downside to that is that it packages as an exe file, so you may need IT intervention to run it, where you don't with an xla/xlam
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  5. #5
    I use InnoSetup to install several VB6 DLLs into protected areas of the hard disk (mostly VB6 runtime files). But before that I used InnoSetup to install XLA/XLAM files. I still have the scripts and may post them on my site at some point. Dutch also has some sample InnoSetup code on his site for installing Excel addins. http://dutchgemini.wordpress.com/2012/01/04/install-and-uninstall-an-excel-add-in-with-innosetup/
    Regards,
    JP

  6. #6
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,294
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    Thanks JP!
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

Posting Permissions

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