word add-in deployment

R

Ratnesh Raval

Hi all,

I'm developing word 2003 add-in using visual studio 2003 and VB.net
this is the configuration on developer machine.
But i want this to work on word XP/2002/2000 also.

I read that i've to make separate setup for xp/2002. but how can i make that
on my developer machine, coz i;ve office2003 pia installed already.

Is it possible to make one setup for all version by customizing setup? ( i
dont want to use late binding )
 
R

Ratnesh Raval

Ratnesh Raval said:
Hi all,

I'm developing word 2003 add-in using visual studio 2003 and VB.net
this is the configuration on developer machine.
But i want this to work on word XP/2002/2000 also.

I read that i've to make separate setup for xp/2002. but how can i make
that on my developer machine, coz i;ve office2003 pia installed already.

Is it possible to make one setup for all version by customizing setup? ( i
dont want to use late binding )
 
X

XL-Dennis

Hi,

For Word 2000 You need to create Your own set of PIA as there exist no
official PIA for this version.

Creating managed COM add-ins require that we create a setup for each version
of Word we want to target. Unlike development on the classic VB platform we
can't reference the earliest version's PIA and it will work with later
versions. This will only be available from version 2003 and forward...

The deployment of a managed COM add-in require that we use an unmanaged DLL
as a proxy server, which is the loader of the managed COM add-in & CRL. This
is referred to as 'shimming'. See the following article that refer to the
VS.NET 2003:
Isolating Office Extensions with the COM Shim Wizar
http://msdn.microsoft.com/library/d...dno2k3ta/html/ODC_Office_COM_Shim_Wizards.asp

In addition, it will require that on the targeting computers both .NET
Framework and the valid PIA are installed.

You may also be forced to take into consideration the following article:
Add-ins, smart documents, or smart tags that you create by using Microsoft
Visual Studio 2005 do not run in Office
http://support.microsoft.com/kb/908002/en-us

Sorry to be so pessimistic but developing managed COM add-ins for multiply
versions is indeed a difficult situation.

If You want to have a smooth creation and deployment of the add-in then I
would suggest that you use VB 6.0 instead (if that is an option).

Kind regards,
Dennis
 
J

Joe

hi.

developing an addin for all the 3 differnt versions of office is not a
huge task .. provided u ve comAddinShim.exe .. Its available for VS2003
and 2005 to be downloaded. Link:
http://www.microsoft.com/downloads/...373C180EC114&displaylang=en#AffinityDownloads

then.. dont use Office 2003 PIa's if u plan to target all the three
versions. just use XP pia's..

build the project the add the shim project , then make a setup project
to package it..

the step and given in the documentation of the shim wizard.

if u get stuck up anywhere do contact me.

regards .. happy shimming :)
 
P

pavan

Hi Ratnesh,
Pls let me know answers for the following:
1. Is the functionality of your add-in same for all the versions (i.e.
same code)?
2. Do you require to use version-specific features while writing your
code (like XMLNodes in Office 2003 that is not available in versions
below)?

If so,
1. you can implement an interface that declares all the methods
(assuming that the methods will be same for all versions as the code is
same).
2. If you require parameters/arguments that have to version-specific
then declare them as objects in you interface. You can do the
type-casting as necessary.
3. Implement one class each for different versions and put your code
respectively.
4. In your Connect class, in OnConnection check the version of OfficeXP
and instantiate the appropriate class as the interface object.
5. All through you connect code you can use the properties and methods
from the interface object without needing to know which version your
add-in is running on.

You will have to do shimming once you are done with this code. This,
I'm presuming, you are aware of. Pls feel free to post if you need to
know more.

Hope this helps,
Regards,
Pavan
 
R

Ratnesh Raval

Hello everyone,

Thanks for replies.

i've tried some of the suggestions. and i got some questions.

why everyone suggests to use shim. my add-in works fine even without
shimming. and i dont need to sign the dll. Is the shimming still important?
if yes then please tell me why.

also when deploying, the target machine needs the specific PIAs, is there
any way to detect office version during installation and install appropriate
PIA's at that time from my setup ( or this will be a Setup Customization
question and i need to post in other forum)

and yes, the *late* binding also works fine.

Thanks
 
R

Ratnesh Raval

Hey pavan,
thanks for reply.
1. Is the functionality of your add-in same for all the versions (i.e.
same code)? YES

2. Do you require to use version-specific features while writing your
code (like XMLNodes in Office 2003 that is not available in versions
below)?
No.

for all the steps you listed below, which Dll i need to use?
i mean , do i have to use word 2003 (word 11.0) dll ?
 
X

XL-Dennis

Ratnesh,
why everyone suggests to use shim. my add-in works fine even without
shimming. and i dont need to sign the dll. Is the shimming still important?
if yes then please tell me why.

If it's only exist one managed COM add-in then there is no need for shimming.

If not then You can take part of a recent article I wrote which also refer
to some KB-articles:
http://www.dailydoseofexcel.com/arc...-managed-com-add-ins-with-vbnet-2005-part-vi/
also when deploying, the target machine needs the specific PIAs, is there
any way to detect office version during installation and install appropriate
PIA's at that time from my setup ( or this will be a Setup Customization
question and i need to post in other forum)

I assume that someone who have made a multiply setup can give You guiding on
that subject.
 
P

pavan

for all the steps you listed below, which Dll i need to use?
i mean , do i have to use word 2003 (word 11.0) dll ?
Use the dlls of the least office version that you wish to support. lF
you intend to support Office XP and 2003 then use XP dlls (this is coz
you do not want to use any version specific features)

Shimming of COM Add-ins is very necessary just as for the same reason
that your managed code need app domains. Shimmed add-ins are isolated
and are not effected due to other add-ins.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top