Smart tag & add in as one dll

Add-in Express™ Support Service
That's what is more important than anything else

Smart tag & add in as one dll
Can I create a project with smart tag functionality being an add-in 
Jacco van der Pol




Posts: 30
Joined: 2005-09-13
Can I create a project with smart tag functionality being an add-in. Yes, I can do this, but I get 2 dll's which run in different contexts.

I'd like to have the add-in functionality and smart tag functionality in 1 dll, because I start a task window from my add-in , and when my smart tag event fires, it has to do something in my task window.

When I added an add in to my smart tag project, it automatically produced another shim. I tried to remove that one and use the original one. My smarttags were operational, but my buttons weren't

Does Anyone know what I'm doing (wrong) :D

Jacco van der Pol
Posted 13 Sep, 2005 09:21:18 Top
Sergey Grischenko


Add-in Express team


Posts: 7228
Joined: 2004-07-05
Hi Jacco.

To create an add-in and smart tag projects in one assembly do the following:
1. Create a new smart tag project.
2. Add a new COM Add-in Module via the Add New Items dialog in Visual Studio.

Posted 13 Sep, 2005 14:54:47 Top
Jacco van der Pol




Posts: 30
Joined: 2005-09-13
Hi Sergey,

I did this. But when I added the new com add-in module it asked me to create another shim. I said yes. Was this wrong and should I have said no?

Jacco
Posted 13 Sep, 2005 16:03:18 Top
Sergey Grischenko


Add-in Express team


Posts: 7228
Joined: 2004-07-05
Jacco, the ADX Wizard asks you about a shim for a new add-in module and not for the smart tag module. If you use a shime for smart tags then you also can use a separate shim for the add-in.
I said yes. Was this wrong and should I have said no?

In general it's up to you. The best practice is YES answer.
Posted 13 Sep, 2005 19:12:24 Top
Jacco van der Pol




Posts: 30
Joined: 2005-09-13
Sergey,

I understand what you are saying, but it doesn't solve my problem.

What I'm trying to do is this:

In my add-in I have a button (in word) and when the user clicks this button, I start some task window. It is a window, not a dialog, so it stays there, next to te word application.

When my smarttag action event fires, I want to show something about that smart tag in my task window. But I cant get to the window because it resides in a different context.

I tried to solve this problem by using 1 shim project, but maybe there is another solution.

Regards

Jacco van der Pol
Posted 14 Sep, 2005 03:09:56 Top
Sergey Grischenko


Add-in Express team


Posts: 7228
Joined: 2004-07-05
Hi Jacco.

Ok. I will try to find a solution for you as soon as possible.
Posted 14 Sep, 2005 05:29:49 Top
Sergey Grischenko


Add-in Express team


Posts: 7228
Joined: 2004-07-05
Jacco, I have a question.
Is it necessarily for you to use shims in your project?
Posted 14 Sep, 2005 05:37:14 Top
Sergey Grischenko


Add-in Express team


Posts: 7228
Joined: 2004-07-05
Hi Jacco.

You can download an example here:
http://www.add-in-express.com/projects/addinandsmarttagexample.zip
I don't use shim projects in this example. If you need a shimed example just let me know.
Posted 14 Sep, 2005 10:29:37 Top
Jacco van der Pol




Posts: 30
Joined: 2005-09-13
Hi Sergey,

I forgot to thank you for the example. It was very helpfull.
:D

Jacco
Posted 04 Oct, 2005 14:16:08 Top
Jacco van der Pol




Posts: 30
Joined: 2005-09-13
Hello

I still have questions about combined addin and smarttag functionality

I created a smarttag project, shim included.

I added an AddIn, shim included.

I have 1 smarttag/addin project and 2 shim projects (and a setup project)

It seems to work, but when I click an adx commandbar button, my event fires 2 times. It seems that something is loaded twice here.

Questions:

1. Do you know why this is happening

2. Is this the best way to combine addin and smarttag functionality, or should I do it with 1 shim (or no shims at all).


Jacco
Posted 05 Oct, 2005 08:09:52 Top