• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 523
  • Last Modified:

Add a reference to a Word Document Project

I have created a Word Document Project that creates a word document based on the content of some tables.  All I need to do is set an ID number via a property or constructor before the docuement loads.
This works fine but I want to be able to call this document from my main application.  I have tried creating a refence to the the project but cannot access any constructors or properties.

Kevin Robinson
Kevin Robinson
1 Solution
Meir RivkinFull stack Software EngineerCommented:
can u post the code u already implemented just to get an idea?
Kevin RobinsonPrivate VB.NET ContractorAuthor Commented:
Basically I have two projects.   One is the Word Document VSTO project the other is a Windows forms project.  I need to be able to open up the word document from the windows form project by passing a parameter in the same way I would another refereneced project.  

The problem is that first of all you cannot create a project reference to a word project and if you create a file reference to the word docuement you cannot get access to the constructors or any paramters.  So I have do way as yet to pass a parameter from one to another.

I dont think I really need to post any code as it would only confuse things.  
Miguel OzSoftware EngineerCommented:
I do not think you can call your WORD VSTO project from a win form.
The reason is that VSTO solutions are designed to be hosted by an Office application (in this case Word)

If you really need this functionality I will suggest to build a library dll will all your business rules and Word interaction so that they are used for both your VSTO project and your Win form class. Remember that VSTO is a smart wrapper of the Office PIA.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now