Solved

Wordpad and OLE

Posted on 1998-04-23
5
1,240 Views
Last Modified: 2013-12-29
Is Wordpad OLE enabled?
From a VB app, I would like to execute Wordpad, have it reformat my text and then exit. I intend to do this repeatedly.
The purpose is to take raw text, which is the result of an OCR proces and format as RTF (rich text format).
Thanks to anyone that may know.
RHP
0
Comment
Question by:rhprhp
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:the_whelk
ID: 1698680
Yes WordPad is OLE enabled, but I don't know what you mean by the rest of the question. Can you rephrase it?
0
 

Author Comment

by:rhprhp
ID: 1698681
Edited text of question
0
 
LVL 3

Accepted Solution

by:
jlove1 earned 50 total points
ID: 1698682
if you're just trying to SAVE some TEXT as .RTF, I'd use the SAVEFILE command
Savefile cam save the contents of a RichTextBox control to a file.. If you need more help than this, post a comment.
The following is pasted directly from the VB5 Help File

Syntax

object.SaveFile(pathname, filetype)

The SaveFile method syntax has these parts:

Part      Description
object      Required. An object expression that evaluates to an object in the Applies To list.
pathname      Required. A string expression defining the path and filename of the file to receive the contents of the control.
filetype      Optional. An integer or constant that specifies the type of file loaded, as described in Settings.
Settings

The settings for filetype are:

Constant      Value      Description
rtfRTF      0      (Default) RTF. The RichTextBox control saves its contents as an .RTF file.
rtfText      1      Text. The RichTextBox control saves its contents as a text file.
Remarks

You can also use the Write function in Visual Basic and the TextRTF and SelRTF properties of the RichTextBox control to write .RTF files. For example, you can save the highlighted contents of a RichTextBox
 control to an .RTF file as follows:

Open "mytext.rtf" For Output As 1

Print #1, RichTextBox1.SelRTF
0
 
LVL 2

Expert Comment

by:the_whelk
ID: 1698683
Do you have any comments as to why you are rejecting jlove1 answer.
0
 
LVL 3

Expert Comment

by:jlove1
ID: 1698684
what?

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

856 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