Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i embed Microsoft word in vb.net? i want the file to open in vb.net itself and modifications can be done also.
thnx
Posted
Comments
PeiWHoward 17-Jul-17 6:38am    
DiiR you may want to check out this VB.NET library for Word, it can enable you to easily create your own Word editor, as demonstrated here.

No. Microsoft wants you to use Word. SyncFusion has some controls you can buy to do this, I believe, but Word itself does not offer this. You can write VB.NET code to read and write Word docs, but not to show an editor.
 
Share this answer
 
Comments
DiiR 13-Feb-12 14:30pm    
while doing some research i found something called Edraw office viewer which can be added as reference, but it is not showing in my toolbox..
http://www.edrawsoft.com/embed-word-vbnet.php
thnx..
Christian Graus 13-Feb-12 14:33pm    
OK, well, a third party solution is always possible ( I did mention SyncFusion ). If you can't get it to work, you need to talk to the vendor of that component, though. I don't know.
Sergey Alexandrovich Kryukov 13-Feb-12 14:54pm    
That is true of course, my 5.

I must say I'm skeptical about the whole idea of using Word or anything like that in the application. If looks like an attempt like bringing non-developer's habits (using Office is one of then) into programming. That's why developing world is contaminated by stupid and nearly useless projects like processing data in Excel or using it as a database or a presentation tool.

I offer some alternative though, please see.
--SA
As Christian explained, Word is not designed to be embedded in application.

One remote possibility is to run Word in a separate process, make its windows a child windows of some control of your application and use Office automation to control it. This solution would depend on Word installation and would be so ugly and awkward in implementation that I don't want to discuss it any longer.

You have much better chances to embed OpenOffice with is Open Source and offers roughly Word functionality (and can work with all format of Word document). Please see this short article:

http://opendocument4all.com/content/view/22/39/[^].

See also:
http://en.wikipedia.org/wiki/OpenOffice.org[^],
http://www.openoffice.org/[^].

[EDIT, based on follow-up discussion]

All those options with near-Word capabilities are too hard to implement, for miserable benefits, in practice.
Even RichTextBox is more or less awkward.

This this is the best alternative for rich format presentation: a renderer of HTML. This CodeProject work is done just for System.Windows.Forms and it's just perfect:

A Professional HTML Renderer You Will Use[^].

Not only this is good in usability and HTML expressive power, it add a lot of features such as links to embedded resources (special custom URI schema), which is very important for embedded renderer.

—SA
 
Share this answer
 
v3
Comments
DiiR 13-Feb-12 15:04pm    
i'l try these alternatives. in fact the whole idea is to create a form where the user can upload a picture then add some text to it. also format the text. so i was trying to embed the word in vb.net then save the file as an image which i will then use as a title page on a video.
Thnx..
Sergey Alexandrovich Kryukov 13-Feb-12 17:20pm    
But why Word? You can use RichTextBox. Isn't it enough?
Oh! Wait a minute! There is another, much better alternative!..

Hold on...
--SA
Sergey Alexandrovich Kryukov 13-Feb-12 17:50pm    
Done! please see after [EDIT]. Who needs proprietary Word or poor RTF formats if we can have fully-fledged HTML?!
--SA
Sergey Alexandrovich Kryukov 13-Feb-12 17:51pm    
When and if you finally get it, consider accepting the solution formally (green button) -- thanks. :-)
--SA
DiiR 14-Feb-12 1:30am    
word ws just an option..i was trying to do something with it..
this one i can see its much better. i am actually working on it..but i guess it suits the app am developing..
Thanks a lot for your time and help..

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