Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pointers please - using Word as an editor

Status
Not open for further replies.

AndyGroom

Programmer
May 23, 2001
972
0
0
GB
I've got an application where people can make notes of telephone calls and at the moment it happily uses an RTFBox to take the notes. However, it's now got the stage where people expect to be able to paste in images, tables and other things that the RTFBox doesn't support.

If Office is installed on their machine, I'd like to give users the option of using Word as the notation area editor. I've found this OLE example but it's a bit basic; the biggest problem is that it doesn't display any toolbars.

Does anyone have an pointers they can give me, such as how to open a Word editor window in VB complete with toolbars and menus, or the next best thing would be to open a new Word instance with a button on the toolbar for getting back into my app (a bit like composing a new email in Outlook 2003).

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
Actually it is possible to get the RTB to support images and tables ...
 
Yes I've seen examples of that (eg. but they always have drawbacks. If you copy a table from Excel and paste it into a text box you expect it to carry across the background colours, borders and so on, which I don't think are supported by the RTB. In the link above you can also insert an image into a RTB but it can take literally minutes to convert it into the required format.

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
The DHTMLEdit control can be used as a kind of "rich" edit control.

Since Microsoft pulled it from Windows beginning with Vista, you'll need to get the replacement "safe" control they provide now. This one can be deployed to XP, Vista, and Win7 (and maybe Win2K?).

You'd probably also want to track down its SDK, though that's a tough one to find now.


I just tested an existing program. I was able to paste in a range of cells copied from Excel. Even borders, fonts, and background colors came across. However I lost pattern-shading on cells using that feature.

Like the RTB, you can extract/save either plain text or "rich" HTML. There is an object model that allows you to add things like buttons for text entry bolding, italics, font selection, etc.

Pasting images takes a little work, since HTML doesn't hold images inline. However nothing prevents you from inserting <img> tags pointing to separate image files you create as part of a paste action.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top