nedumaran
Posts: 21
Joined: Tue Apr 14, 2009 10:49 am

Creating an installer for multiple Office 2007 add-ins

I've read the threads on creating installers for office add-ins. I have some basic questions:

I have written an add-in each for Word 2007 and PowerPoint 2007 using VS2010. Both the add-ins work fine on my development machine.

When I 'publish' the add-ins in VS2010, the setup files are created, and using them I am able to install the add-ins on other machines. However, my preference is to use a single installer and I like AI better.

1. I created an Office Add-in installer project in AI. The wizard asks me to choose between 'VSTO Office Add-In' and 'Native Office Add-In'. What is the difference between the two and which one should I choose?

2. I chose VSTO Office Add-In and selected my VS project for the wizard to import the files from. Picked the Word add-in and it gave me a list of 'detected files' with some files selected. I clicked next and in the next dialog, I chose VSTO 3.0, Office 2007 and Word. Clicked Finish, saved, compiled. The MIS installs ok on another machine but the add-in appears inactive.

I am not sure if I need to add anymore files in the 'Files and Folders' section.

Any pointers?

~ MUTHU
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Creating an installer for multiple Office 2007 add-ins

Hi Muthu,

1. Native add-ins are rarely used, but we decided to implement them based on the feedback received from our MVP partners, which have a lot more experience in
the field of Office add-ins. Most of the developers are using VSTO add-ins, which I suppose is the case for you too.

A native add-in usually is represent by a single resource file, which you select during the wizard. For registration a set of registration entries/options are generated
by Advanced Installer based on the Office version and application specified in the wizard.

If you did not knew what a native add-in is most surely you are creating a VSTO add-in.

2. If any mandatory files would be missing the wizard would stop you until you provide them. This could be related to the load options that you've set in the wizard. On one of the wizard pages you have the option "Load at startup", did you had that option set for your project?

Regarding the creation of a single installer for all add-ins, this is not supported by default in our wizards. But in the following thread I explained some tricks on how to install an add-in for multiple versions of Office. Similar changes should be done and when you install for different applications, but you will also need to the add the add-in files in the Files and Folders page and edit the registry entries: http://www.advancedinstaller.com/forums ... =2&t=19669

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nedumaran
Posts: 21
Joined: Tue Apr 14, 2009 10:49 am

Re: Creating an installer for multiple Office 2007 add-ins

Hi Bogdan,

Thanks for your help. I have made good progress. Have some follow up questions:

1. In the 'Choose the targeted Office version and product' dialog, I selected the following:
Visual Studio 2010 Microsoft Office developer.
Microsoft Office 2007
Microsoft Word

2. In the next dialog, I left 'Load at startup' as it is.

3. I picked '.Net Framework 4.0' and checked Visual Studio 2010 Microsoft Office developer' and 'Microsoft Word 2007 Primary ...' (The labels get truncated)

4. Check all items in the add-in prerequisites

5. Created the project.

When I check the Prerequisits->Setup Files. I see 'Download single file from URL' selected for .Net Framework 4.0 and VSTO2010 run time. However, the Office 2007 PIA has 'Open website in default Internet browser'.

Will it be possible have this downloaded as a single file as well -- or packaged together in the installer?
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Creating an installer for multiple Office 2007 add-ins

Hi,
Will it be possible have this downloaded as a single file as well -- or packaged together in the installer?
Yes, you can edit that and set it as you wish. We set it by default to "Open web site..." because we could not found any stable links from Microsoft for the resource.

The wizard has only the purpose to automatically take care of the most important settings from the package, and increase your development spead. However, all the settings done by the wizards can be manually adjusted by you in the project from the corespondent views, like the Prerequisites, Files or Registry views.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nedumaran
Posts: 21
Joined: Tue Apr 14, 2009 10:49 am

Re: Creating an installer for multiple Office 2007 add-ins

Thanks, Bogdan.

I managed to create the installer. The Add-in got installed successfully.

One final question: I have a custom dll that gets called from my VSTO code. The dll is also copied into the same directory as the Add-in dlls. However, when I run the Add-in, the dll does not get called.

Perhaps this is because the dll is not in the same directory as Word, or it's not in the PATH.

Is there a way to fix this?

Thanks so much for the help.

~ MUTHU
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Creating an installer for multiple Office 2007 add-ins

I am not sure what is the problem with the call for the custom DLL. The recommended method is to attach to your add-in, while its running and see exactly what is the problem. It can be just as you suspected, an incorrect path or maybe something from the custom DLL fails.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nedumaran
Posts: 21
Joined: Tue Apr 14, 2009 10:49 am

Re: Creating an installer for multiple Office 2007 add-ins

I managed get the Installer working through the following:

1. Added the additional dll's required to the Windows/System directory. I don't think this is a good practice but it solved my problem.
2. Added both Word and PPT add-ins into the same installer using the workaround recommended in this thread: http://www.advancedinstaller.com/forums ... ice#p47095
3. Included the Office 2007 PIA in the package - so the user is not taken to a Web page during installation

Everything works fine now. Thanks for the support.

~ MUTHU
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Creating an installer for multiple Office 2007 add-ins

I noticed a lot of users need to install Office add-ins in for multiple applications from the same package so I added this improvement on our TODO list, to automate this step too. It should be available by this summer. Stay tuned to this thread as I will post an update when the feature is implemented.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nedumaran
Posts: 21
Joined: Tue Apr 14, 2009 10:49 am

Re: Creating an installer for multiple Office 2007 add-ins

Thanks, Bogdan. That will be a very useful feature.

Regards,

~ MUTHU

Return to “Common Problems”