belote

Hello

I've created a word add-in with vsto by selecting word 2003 add-in.

When I run it in debug in visual studio, it works.

So I run the setup, and that creates me a dll.

I open the template where I want the add-in runs

But in word, in tools -> Templates and Add-Ins, only *.wll files are accepted.

I've tried to rename the dll in wll, but it doesn't work.

Can you help me

Thank you so much.



Re: Visual Studio Tools for Office Can't use my add in with word 2003

Peter Jausovec

Hi,

You can't add an add-in via that dialog, because VSTO addins aren't loaded that way. I am guessing you did not set the CAS policy. I would suggest you read the deployment articles.

Hope this helps.






Re: Visual Studio Tools for Office Can't use my add in with word 2003

belote

Okay, It works, thank you...

but...

now, when I create a new document from any template, my add in is launched :-s

That's not what I want, I want add it to some templates, not all.

Is there a way to do that

Thank you for your help





Re: Visual Studio Tools for Office Can't use my add in with word 2003

Robert Green

If you associate the add in with a template, then the add-in runs when you open the template. So every document created from that template will run the add in.

If you want the add in associated with a document, create a project based on that document rather than on a template.

Does that help

Robert





Re: Visual Studio Tools for Office Can't use my add in with word 2003

belote

Robert Green wrote:

If you associate the add in with a template, then the add-in runs when you open the template. So every document created from that template will run the add in.

Yes! That's what I want to do!

For now, I've foud 2 way to do an add in, but it's not exactly what I want.

I've done a word add-in, which is launched at each word start -> not good

I've created a word template from an existing template, and I've added the code in it. -> good

The fact is that I must do the same thing for 50 templates. So the only way I see for now, it's to create word templates in vsto from each of my 50 templates, to do the same modification.

Actually I search a way to code it 1 time and add it easily to each template.

Do you know a way to do that I've tried to do it in an empty template, and add it in "templates and add-in" in my templates, but it doesn't work.

Thank you so much