Accessing office addins...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I build a com add-in for word 2003/2007 using c# and it works well. Now I
need
to set variable values and run funcions from an external .net program. How
can I do? I tried to access the add-in via object model but with no results..
Is it possible to intercept the add-in events?

Thanks

GaetanoG
 
Hi all,

I build a com add-in for word 2003/2007 using c# and it works well. Now I
need
to set variable values and run funcions from an external .net program. How
can I do? I tried to access the add-in via object model but with no results..
Is it possible to intercept the add-in events?

Thanks

GaetanoG

Can you be a bit more specific about what you want to do?
You have an add in that functions, what do you mean by "External .net
program"? Where are these variables and methods you want to set/run?
From where do you want to run/set them?
Which add-in events are you after and where do you want to intercept
them?
 
Hi
I build an add in using vsto (a shared add-in). Inside add-in I have some
functions for creating tables and fields in a word document.
I have build a c# windows application (the External .net program) and I need
to call the functions inside the add-in to inizialize variables and create
tables etc.
This is what I need.
I tried to use the Actions Pane but with no results.. Is there a way to
inizialize
a variable inside word document or some tricks to share a dll between word
and
my windows apps? (the last solution could be useful too..)

Thanks

GaetanoG
 
Hi
I build an add in using vsto (a shared add-in). Inside add-in I have some
functions for creating tables and fields in a word document.
I have build a c# windows application (the External .net program) and I need
to call the functions inside the add-in to inizialize variables and create
tables etc.
This is what I need.
I tried to use the Actions Pane but with no results.. Is there a way to
inizialize
a variable inside word document or some tricks to share a dll between word
and
my windows apps? (the last solution could be useful too..)

Thanks

GaetanoG






- Show quoted text -

Ok it sounds like you've got functionality that you want to share
between an add in and a windows app. The best way to achieve this is
to refactor the shared functionality into a seperate class library,
you can then add a reference to the class library in both the windows
form app and the Add in. Does that help? I'm still a little unclear
about where the variables you are attempting to set are, in the add in
I'm assuming?
 
Hi
I tried to do a shared dll with static variables.. The problem is that when
i try to
get value from add-in (set variables is from windows app) values are null..
Anyway I will try again to do this.. You are talking about a simple dll,
right?
Where can I find some source code about the dll i have to create?
Thanks

GaetanoG

Ps
Variables are in the add-in
 
Hi
I tried to do a shared dll with static variables.. The problem is that when
i try to
get value from add-in (set variables is from windows app) values are null..
Anyway I will try again to do this.. You are talking about a simple dll,
right?
Where can I find some source code about the dll i have to create?
Thanks

GaetanoG

Ps
Variables are in the add-in

Ah, does that mean the external program is not written by you so you
don't have the code? Or do you have the source?
What does the external program do?

If you have the source for the external program then all is good.
Further questions I'm afraid. do you intend to use the external
program to sort of remote control the add in or does it just share
code? So in your winform app there might be a method called "GetData"
and you just want to use that GetData in the add in?

If that's the case then yep create a class library (as you say just a
DLL (but isn't everything these days :))
In that you add a class or classes which do all the GetData type work.
You add a reference to that DLL to your winform app and then replace
the code in the winform app with calls to the new class(es). Finally
you add a reference to the class library to your add in and reuse the
Getdata methods. I don't know what your methods are called, so I'm
just using Getdata as an example.


Am I getting closer to what you're attempting?
 
Hi
I build all the programs so I have all the sources.. I think my explanation
is not so clear..
the windows program is a Windows form app written in c#.. it connects to
database and do other things not related to word.
The add-in (vsto in c#) creates tables and other fields in a document..
I attempt to call function and set variables (which are inside the add-in)
from the windows form app. I'm attempting to do the following thing..
In my windows form app I have a funcion called SetVars which set 2
variables, one called strVal01 and the second calle intVar01. After setting
variables I open a word document and I need to run a function called
CreateTabCust which is inside the add-in. The function CreateTabCust needs to
use the variables I set before from my windows app.
I hope to be more clear..
Thanks

GaetanoG
 

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

Back
Top