Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Wordpad and OLE

Posted on 1998-04-23
5
Medium Priority
?
1,286 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 100 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

A small collection of useful tips and tricks for Windows 10 users that I decided to write as a result of recent questions that were asked and answered at Experts Exchange. Two short video tutorials included. Enjoy..
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

971 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