display word file on form
-
first :thanx so much second :handel it mean: i need to count words, catch user events, merge to file....things like these. do u mean to host my web browser in my form and open my doc file in the web controle?? i'll c what can i get from this thnx another time
Handling a word document the way you want it and showing it at the same time is best done in the context of a Word add-in, where you get both your freedom and the automation handle to play with. I'll definitely would go that route, rather the opposite where you are asking for troubles. Plenty of articles for writing your add-ins everywhere. Troubles since :
- As of date, winforms don't (directly) support active documents (ole container). Whidbey due in June is supposed to solve this, but I guess this is too late!
- Internet explorer is a ole site for all sorts of things, including active documents. So if you host IE in your form, it can in turn act like a host for whatever OLE document including Word, Excel, ... But showing it is mostly the thing you can do with it. It's much harder to tunnel commands this way.
- Although C# does COM interop, it's not very good at doing this, especially when you need both the visible stuff, and the automation stuff. What I mean is that there are a lot of problems when you the stuff to release well from the memory, to behave well when you click, etc.
Good luck!
-
Handling a word document the way you want it and showing it at the same time is best done in the context of a Word add-in, where you get both your freedom and the automation handle to play with. I'll definitely would go that route, rather the opposite where you are asking for troubles. Plenty of articles for writing your add-ins everywhere. Troubles since :
- As of date, winforms don't (directly) support active documents (ole container). Whidbey due in June is supposed to solve this, but I guess this is too late!
- Internet explorer is a ole site for all sorts of things, including active documents. So if you host IE in your form, it can in turn act like a host for whatever OLE document including Word, Excel, ... But showing it is mostly the thing you can do with it. It's much harder to tunnel commands this way.
- Although C# does COM interop, it's not very good at doing this, especially when you need both the visible stuff, and the automation stuff. What I mean is that there are a lot of problems when you the stuff to release well from the memory, to behave well when you click, etc.
Good luck!
after alot alot alot of searshing i agree with but i have a project and i have to finish it any way, and i'll not give up till i finish it, event if i have to code any needed objects for this, but i do not want to go that way now, i have found com component that display the doc but i can not play with it, ........................!!!!!!!!!!
-
after alot alot alot of searshing i agree with but i have a project and i have to finish it any way, and i'll not give up till i finish it, event if i have to code any needed objects for this, but i do not want to go that way now, i have found com component that display the doc but i can not play with it, ........................!!!!!!!!!!
-
first :thanx so much second :handel it mean: i need to count words, catch user events, merge to file....things like these. do u mean to host my web browser in my form and open my doc file in the web controle?? i'll c what can i get from this thnx another time
Stephane's idea is probably the best way to embed a Word document in your application. There is another way, though, if you really want to go to all the work, but you should be very familiar with ActiveX programming interfaces. The WebBrowser control (actually, MSHTML) can host the doc because it is a container. Making your application a valid ActiveX container is very difficult and requires that you implement many interfaces (most of which are not defined in the .NET base class library, so you either have to create an interop assembly or manually define the interfaces with all the right attributes and parameter marshaling). Just to name a view interface, you'll need to read about
IOleContainer
,IOleDocumentView
,IOleWindow
, and many more. You can use oleview.exe to examine the interfaces implemented by the Microsoft HTML Document COM object (mshtml.dll) for a list. Not all the interfaces have to be implemented, though.-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----
-
and i need to display word docs on my form and handle it. i can do this with excel docs by adding it's component in the toolbar from com components. but there is no com component for word. and i do not know what is the problem exactly!!!! Iam using vs.net 2003 profissional and office 2002(xp) and can not use office2003 thnx in advance
I found an activex control built by microsoft people that holds an Office document, and you can use it in your forms. I don't have the url, but have the file. I'll put it on my server and you can download it from there. http://www.juriscomp.com/emp/guille[^] Free your mind...
-
and i need to display word docs on my form and handle it. i can do this with excel docs by adding it's component in the toolbar from com components. but there is no com component for word. and i do not know what is the problem exactly!!!! Iam using vs.net 2003 profissional and office 2002(xp) and can not use office2003 thnx in advance
I found the URL http://support.microsoft.com/support/kb/articles/q311/7/65.asp[^] Free your mind...
-
I found the URL http://support.microsoft.com/support/kb/articles/q311/7/65.asp[^] Free your mind...
Thnx so much Guillermo i've downloaded this activex and i'll test it and citact u back thnk in advance u was so helpful
-
I found the URL http://support.microsoft.com/support/kb/articles/q311/7/65.asp[^] Free your mind...
i tryed the activex and it's exactly what iam looking for. but i have found a web sample writen in vbscript(client side script) and i wanna know if i can deal with this activex by dynamic serverside script, or by another words can play with this control by asp.net coz i do not know much about vb syntax.
-
i tryed the activex and it's exactly what iam looking for. but i have found a web sample writen in vbscript(client side script) and i wanna know if i can deal with this activex by dynamic serverside script, or by another words can play with this control by asp.net coz i do not know much about vb syntax.
What exactly do you want to do ?? I used the ActiveX on a windows form application, but I've never used it on a web page, just saw the example that came with the package. If you give me a little description about what you want to do, may be I can give you a hand. Free your mind...
-
What exactly do you want to do ?? I used the ActiveX on a windows form application, but I've never used it on a web page, just saw the example that came with the package. If you give me a little description about what you want to do, may be I can give you a hand. Free your mind...
never mind Guillermo i desided to use it with windows form but plz allow me to contact u after this. coz i have some problems in this project coz most of my experience in the web field with java(jsp) & asp.net(c#) thnx so much