Solved

winforms embbed office documents for visualization

Posted on 2010-11-19
5
643 Views
Last Modified: 2013-11-26
hello, i need help on how to show office documents embbed in a application..

all i managed to find was:

http://support.microsoft.com/kb/304662

that is to use webbrowser to show office documents.. but the problem is that i will be showing office 2007 documents, and in the article it says webbrowser doesnt support such.. (only if i modify the registry, and i cant).. the other solution link doesnt work..

does any1 how i can show office 2007/2010 documents in a .net application (basic i need to show word documents and office msg files)

thx
0
Comment
Question by:eguilherme
  • 3
  • 2
5 Comments
 
LVL 12

Expert Comment

by:Hairbrush
ID: 34186850
Take a look at http://www.west-wind.com/weblog/posts/1299.aspx - the author has written a good description of how to embed Word into a .NET winforms application.

Alternatively - have you thought of having links within your application that just open the appropriate application?
0
 
LVL 10

Author Comment

by:eguilherme
ID: 34206200
yes i saw that before Hairbrush.. the problem is his solution is the same the microsoft article says.. embbed in a internet explorer activex..

but as the article says it doesnt work in office 2007 documents.. you would have to create your own component or change the client registry to make ie open office 2007 doc.. but that is not an option..

and to just open the documents in a office app itselft isnt really that good because the app im workin on needs to show both the app window and its info and the office documents side by side.. (so i either embbed the office document within a form i made or somehow using windows api/etc rearrange the office window to be side by side with mine.. but doesnt look that viable solution either)
0
 
LVL 10

Accepted Solution

by:
eguilherme earned 0 total points
ID: 34212493
ok.. i gave up trying to add them to my program in a "normal" way..

im using now a combination of

http://www.pinvoke.net/default.aspx/user32/SetParent.html
http://www.pinvoke.net/default.aspx/user32/ShowWindow.html

to show the office application window inside my app.. well since i dont need to modify anything in the document but just show it in my application this solve my problems for now
0
 
LVL 12

Expert Comment

by:Hairbrush
ID: 34212976
Thanks for sharing your solution - I am sure someone else will end up finding it useful!
0
 
LVL 10

Author Closing Comment

by:eguilherme
ID: 34237133
found a solution myself
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question