Re: Accessing office addins...



On 6 Aug, 18:16, GaetanoG <Gaeta...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
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

"DeveloperX" wrote:
On 6 Aug, 16:30, GaetanoG <Gaeta...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
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

"DeveloperX" wrote:
On 6 Aug, 14:30, GaetanoG <Gaeta...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
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?- Hide quoted text -

- 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?

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?

.



Relevant Pages

  • Re: Honestly Curious
    ... makes it necessary to put parts of the code outside the app. ... *all* Windows apps need to use dlls. ... Never heard of "dll Hell"? ... But then neither is using an uninstaller. ...
    (comp.sys.mac.advocacy)
  • Re: Accessing office addins...
    ... the windows program is a Windows form app written in c#.. ... I attempt to call function and set variables (which are inside the add-in) ... from the windows form app. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Heavy Application with Multiple Modules
    ... When you do a new project, the template for a DLL is called a Class Library. ... Start with a brand new project, a Windows ... This creates a reference from your main app ... so you can use it in the main app. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Heavy Application with Multiple Modules
    ... When you do a new project, the template for a DLL is called a Class ... Now you have one solution, with two projects: one a Windows Application, ... browser, right click, and select Add Reference. ... from your main app to the class library, so you can use it in the main ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Visual Basic 6 Program Wont Start on Other Machine
    ... In order to get any VB App to run on a machine, ... will need to have the VB Runtime dll on that machine. ... My development machine is Windows XP Professional Service Pack 2. ... The target machine is Windows XP Professional Service Pack 2. ...
    (comp.lang.basic.visual.misc)

Loading