Click here to Skip to main content
15,891,704 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a winform application and beside it i have a VSTO Project. How can i open the word document embedded in the winform project? Thanks. I would be thankful if you could answer the question.
Posted
Updated 26-Sep-11 19:38pm
v2
Comments
Sergey Alexandrovich Kryukov 26-Sep-11 2:31am    
How it is "embedded" is you still have to open it?
Tag it properly: add WinForms; also, I hope it's VB.NET, not VB? Tag it.
--SA
Hamid Noahdi 26-Sep-11 2:46am    
I use AXFramer Control in the form, i want to refrence the file in the VSTO Application, but not the address , because the start up project is winform
Dirk C De Winnaar 26-Sep-11 11:08am    
Use the Webbrowser to host the .doc (word) document. Here's and topic about it:
http://social.msdn.microsoft.com/Forums/en/netfxbcl/thread/cd4d7cb7-6021-4a3b-88fa-7a861595c7e2

Use code like this
app = CreateObject("Word.Application")
app.Visible = True
Doc = app.Documents.Add
Doc.Activate
app.Selection.Paste
app.Selection.TypeText
 
Share this answer
 
v2
Comments
Hamid Noahdi 12-Oct-11 8:07am    
Thanks, but i solved it.
I found a sloution after testing many things.
1) Build the vsto project.
2) Copy the files such as *.docx and *.vsto files and the dll to the start up path.
3) Download axFramerControl OCX and add it to the windows form.
4) Open the .docx file which you copied to the startup path.

Hamid Noahdi
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900