Deploying Add-ins in a Network Environment

Wulluby

New member
Joined
Apr 5, 2012
Messages
7
Reaction score
0
Points
0
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.
 

Ken Puls

Administrator
Staff member
Joined
Mar 13, 2011
Messages
2,519
Reaction score
4
Points
38
Location
Nanaimo, BC, Canada
Website
www.excelguru.ca
Excel Version(s)
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!
 

Wulluby

New member
Joined
Apr 5, 2012
Messages
7
Reaction score
0
Points
0
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.
 

Ken Puls

Administrator
Staff member
Joined
Mar 13, 2011
Messages
2,519
Reaction score
4
Points
38
Location
Nanaimo, BC, Canada
Website
www.excelguru.ca
Excel Version(s)
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
 

JP2112

New member
Joined
Mar 21, 2011
Messages
8
Reaction score
0
Points
0
Location
NYC
Website
www.jpsoftwaretech.com
Top