Solved

winforms embbed office documents for visualization

Posted on 2010-11-19
5
653 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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.Net WebRequest Code from JSON curl 7 53
"Emulate" TAB key when press Enter Key 3 48
SSIS On fail action 5 38
Data organization issue 7 17
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…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

830 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