Using Word features With a Textbox
Using Word features With a Textbox
Using Word features With a Textbox
Using Word features With a Textbox
Using Word features With a Textbox
Using Word features With a Textbox Using Word features With a Textbox Using Word features With a Textbox Using Word features With a Textbox Using Word features With a Textbox Using Word features With a Textbox Using Word features With a Textbox Using Word features With a Textbox
Using Word features With a Textbox Using Word features With a Textbox
Using Word features With a Textbox
Go Back  Xtreme Visual Basic Talk > > > Using Word features With a Textbox


Reply
 
Thread Tools Display Modes
  #1  
Old 02-24-2005, 03:31 PM
mav0707 mav0707 is offline
Newcomer
 
Join Date: Feb 2005
Posts: 6
Post Using Word features With a Textbox


Hello Everyone,

I am building a VB.NET windows applications and am trying to find out what features I can use from Microsoft Word with a textbox. I know that I can use spelling and grammer check but can I use other features such as font attributes, bulleted lists, etc. I would appreciate any suggestions. Thanks for your time!

Tasha
Reply With Quote
  #2  
Old 02-24-2005, 05:09 PM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

Hmmm... I'm not that good with Word, to say the least...

But to Automate Word -- that is, control Word -- is one thing, but to import it's formatting into your TextBox? Is that what you'd want to do?

I don't think we can do that, not really. I suppose that it's possible that some-sort of Copy-Paste operation from Word to a RichTextBox would be possible (maintaining RTF formatting) but I'm not sure that I understand your question really... Can you clarify it a bit?
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
  #3  
Old 02-24-2005, 08:23 PM
mav0707 mav0707 is offline
Newcomer
 
Join Date: Feb 2005
Posts: 6
Default

Hi Mike,

Thanks for responding. I've been tasked to do the following:

Create a windows application that uses MS Office (Word) for its text editing features. The primary focus of this application is to allow all of the editing and formatting features of Word to be used for any comments/narrative fields. This application must be able to save the entry to the database and restore without losing any data formatting.

I know that grammer and spell check from word can be used but I don't know how to apply the editing and formatting features. We're not even sure how much of this is possible. Please let me know if you need any more clarification. Thank you for your comments.

Tasha
Reply With Quote
  #4  
Old 02-24-2005, 09:44 PM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

Hi Tasha,

So each TextBox is to operate as does Word itself???

The closest native control to this would be a RichTextBox. It can do a ton of formatting features (anything that can be done in RTF), although it does not natively support Spell checking etc.

This "idea" would be more possible, I think, if you were willing to let the user to use Word itself to type the document and then you had some added features or controls added to the Word interface. Like a Button or Menu Item attached to one of Word's Toolbars that said "Send To Database" or the like.

This would be very do-able. But if I understand you correctly, you wish to have complete Word-features within TextBox controls on your Forms? I just don't see how that is going to be possible.

Having more than one Word instance at a time is the major obstacle. Another idea, is that the user could click a button on your Form, upon which Word would open, they could edit within that, and then hit Save or Close (or SendToDatabase) when done... and then resume navigating through your Form.

I think you need to learn about Automation from the start, to get a sense of what can and cannot be done. What you ask is a lot for someone just starting out.

I would start by reading this tutorial:

Automating Office Programs with VB.Net / COM Interop

It is oriented towards Automating Excel (not Word specifically), but the concepts are the same. Then to understand the Word object model from .Net, have a look at:

Word Object Model from a .NET Developer's Perspective

These should give you a pretty good background on the subject... but it's a wide field. You also might want to look into the RichTextBox control; not at full-featured as Word, but it's formatting capabilities are considerable and it may be able to fit your needs?

Hope this is of some help...
Mike
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
  #5  
Old 02-25-2005, 08:16 AM
mav0707 mav0707 is offline
Newcomer
 
Join Date: Feb 2005
Posts: 6
Default

Thanks for your help Mike! If you don't mind, can I ask one more question. Can you open up word inside a .net form? Again, I appreciate your time with this!

Tasha
Reply With Quote
  #6  
Old 02-25-2005, 10:02 AM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

You can't, it's not a Control.

I guess you could play around with the SetParent API, but you'll find this a lot trickier than you might think... And if the User Closes Word (independently of your program) you'll have a HOLE right in the middle of your form!

I really don't think you should be thinking about controlling Word like this. For MS Office Apps it is much more usual to add Toolbars & Controls within Word. It's not really designed to go the other way.
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Using Word features With a Textbox
Using Word features With a Textbox
Using Word features With a Textbox Using Word features With a Textbox
Using Word features With a Textbox
Using Word features With a Textbox
Using Word features With a Textbox Using Word features With a Textbox Using Word features With a Textbox Using Word features With a Textbox Using Word features With a Textbox Using Word features With a Textbox Using Word features With a Textbox
Using Word features With a Textbox
Using Word features With a Textbox
 
Using Word features With a Textbox
Using Word features With a Textbox
 
-->