Solved

Wordpad and OLE

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

A few months ago I had an issue with LaserJet 1020 printer which was installed to XP and Windows 7.  It was installed to XP and working, but when I tried to connect from a Windows 7 PC, it would attempt connection and then fail.  Sometimes the Spool…
The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
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…
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…

743 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

12 Experts available now in Live!

Get 1:1 Help Now