Solved

Wordpad and OLE

Posted on 1998-04-23
5
1,216 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
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.

930 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now