Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Sort Text File Content. Ideas Please :D


Hi ppl.

i have a text file look like this:

Code:
t155.4 ;B277i ;t.3918 ; ; ;
t155.4 ;B277i ;t.3917 ; ; ;
t371.102019 ;M672v ;t.3945 ; ; ;
t371.102019 ;M672v ;t.3946 ; ; ;
m347.952 ;A511e ;t.19409 ; ; ;
m331.88(81) ;P436c ;t.19396 ; ; ;
m347.955 ;P436r ;t.19362 ; ; ;
m34:502.7 ;V855r ;t.19338 ; ; ;
m347.77 ;A779p ;t.19358 ; ; ;
m347.919.3 ;O48j ;t.19373 ; ; ;
and i need to sort him in ALPHABETICAL order, using 2nd column (separated by ; ) to make a sort. i have to 'transform' my text file in something exactly like this:

Code:
m347.77 ;A779p ;t.19358 ; ; ;
m347.952 ;A511e ;t.19409 ; ; ;
t155.4 ;B277i ;t.3917 ; ; ;
t155.4 ;B277i ;t.3918 ; ; ;
t371.102019 ;M672v ;t.3945 ; ; ;
t371.102019 ;M672v ;t.3946 ; ; ;
m347.919.3 ;O48j ;t.19373 ; ; ;
m331.88(81) ;P436c ;t.19396 ; ; ;
m347.955 ;P436r ;t.19362 ; ; ;
m34:502.7 ;V855r ;t.19338 ; ; ;
ps: i already open, read and works with file contents normally. i just want sort content of file using 2nd column.
anybody can help me ?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Sort The Content Of A Text File
hi,

Is it possible to sort the content present inside the text file.?

pls give some idea

thanks and regards

Suresh

Displaying Text File Content In A Datagrid Then Open That Text File...
I have a form named frmTest and contains a datagrid called dgData and two buttons. One is button 'Read text file' and the other one is 'open text file'. I also have a class module named CReadFile. and a textfile named test.txt

The code for button Read text file is:

Code:
Private Sub cmdReadTXT_Click()
Dim obj As CReadFile
Set obj = New CReadFile

Set dgData.DataSource = obj.Read_Text_File
Set obj = Nothing
End Sub
and the code for the open text file button is:

Code:
Open "test.txt" For Input As 1
MsgBox "file opened."
Close
The code inside the class module is:

Code:
Option Explicit

Public Function Read_Text_File() As ADODB.Recordset
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
conn.Open "DRIVER={Microsoft Text Driver (*.txt; *.csv)};" & _
"DBQ=" & App.Path & ";", "", ""

rs.Open "select * from [test#txt]", conn, adOpenStatic, _
adLockReadOnly, adCmdText
Set Read_Text_File = rs
Set rs = Nothing
Set conn = Nothing
End Function
_____________

This is what happens, if you click the button 'Read text file', the contents of the text file will be displayed in the data grid. After clicking the button 'Read text file', I now want to click the button 'Open text file' to open the text file, but an error appears saying: Run time error '70': Permission Denied.
Why is that so? What should I do to solve this problem? I need to open that file again for validation after displaying the contents.

Thank you.

Easy Text File? Any Ideas?
Can someone give me some ideas. I am looking for a quicker method than what I have right now.

I have several files.

The first file is something like this.

Q1: Q1_1

Q2: Q2_1

Q3: Q3_1

Q4: Q4_1

Q5: Q5_1


The second file is something like the first file, but missing question 3.

Q1: Q1_2

Q2: Q2_2

Q4: Q4_2

Q5: Q5_2



I need the results to be in a table like this save to a text file.

Q1 Q2 Q3 Q4 Q5
Q1_1 Q2_1 Q3_1 Q4_1 Q5_1
Q1_2 Q2_2 Q4_2 Q5_2



Any ideas on the quickest way?

Thanks

Converting The Content Of The Text File To The Original File
Hi,

Here's the situation
-Let say I have a file called "Test.zip"
-then I change the extension name to .txt to convert it to text file
-of course when you open it you'll see symbols and other unknown characters
- here's the question:
Is it possible to read that uncommon content of the text file to retain or convert it back to it's original form ( in this case to .zip file)

can someone show me how it's done?

Is It Possible To Load A .txt File's Content Into A Text Box?
... well?

I have a .txt file with 1,021 characters that I need to display in a form, is there anyway to do this?

HELP: View Text File's Content By VB
Please show me how can I view content of text file (i.e logfiles *.txt) by using VB code?

Thaks

How To Download Content Of Text File Without Ocx
How to download content of text file without ocx

I was find some module in planet-source-code, but it have bug ex: over memory when url invalid

help me, thank you very much!

Transfer Text File Content
Hi everyone, can someone show me a code how to transfer content of a text file to another text file?

one text file named A.text i want to open using "For Open" and another one (B.text) using "For Append"..so i want everything in A.text transfer to B.text

Modifying Content In Text File
Hi,

I have a text file "orig.txt" with the content:

0:NV0067:8:BV1:Normal:66.103.203.35
0:NV0067:9:BV2:Normal:66.103.203.36
0:NV0067:10:BV3:Normal:66.103.203.37
0:NV0067:11:BV4:Normal:66.103.203.38
0:NV0067:12:BV5:Normal:66.103.203.39
0:NV0067:13:BV6:Normal:66.103.203.40


I need help in making a vb program that will modify the content in "orig.txt" to this format and save it as modified.txt:
66.103.203.35 X-NV0067-BV1
66.103.203.36 X-NV0067-BV2
66.103.203.37 X-NV0067-BV3
66.103.203.38 X-NV0067-BV4
66.103.203.39 X-NV0067-BV5
66.103.203.40 X-NV0067-BV6

at the end, delete "orig.txt" file.


Any help would be appreciated. thanks!

Content Directory In Text File
Hi
I want to write on a file the names of there files in a directory using visual basic.
Can i do?

bye bye
Silvia

Filtering Out Content From A Text File
I am using the following code to open a text file that contains URLs, I want to "filter" out only the lines/words that start with http https cookie etc and show only the relevant text

how would i modify my dode to do this?

Dim strInput As String
Private Sub Command1_Click()

Open "C: ext.dat" For Input As #1

Do Until EOF(1)

Input #1, strInput

RichTextBox1.Text = RichTextBox1.Text & strInput

Loop

Close #1

End Sub

Getting Content From Text File To Listbot
Like the title stated, I would like to know how I can save the items in a list box to a text file, then retrieve it when needed. I'm going to have names that are going to be added to the listbox and I didn't want to add the items manually everytime i ran the program. Thanks.

Copy Content Of A Text File To Another
How can i copy the content of a text file to another already existing textfile? This copy must first delete the content of the file it writes to.
i.e.

content of file1:

1234567890

content of file2:

aaaaaaaaa

result must be:
erase content of file 2 (aaaaaaaaa) and replace by content of file 1=1234567890

file2=

1234567890

Put Content Of Listbox In A Text File
How can I put the content of a listbox in a text(ascii) file?

Saving The Content Of A Text Box Into A File
i want to have it so when you press a button it saves whatever is in the text box to a file and then if there is a file existing when you open the program again it will load the text from the file into the text box



Edited by - Split on 12/10/2005 1:12:17 PM

How To Save Listbox Content To A Text File
Hi,
I need to write the data in a list box to a text file by creating the text file.

whenever the list box receives a data it should save the data to the text file.

Next time when the data comes to the list box it should get appended with the existing text present in the file.

how can i do that in VB?

I am new to VB...
Expecting reply

thanks in advance

How To Put A Text File Content In A Public String???!!!!
Hi

I have a text file (nearly 3.6 MB)..

I must use it at anytime in my project (all forms..)

So I must read it to one string (public for all at any time).. not to read it every time I want it..

So how to do it with VB6??


It is an urgent problem please!!!


Thanks alot..

Reading A Text File And Overwriting The Content
greetings vb experts. i just want to ask, what's the code for opening a text file, and overwriting its content. as i remem it has commands such as,

open file #.... (and so on)

can you pls help me... thank you so much

How To Put A Text File Content In A Public String???!!!!
Hi

I have a text file (nearly 3.6 MB)..

I must use it at anytime in my project (all forms..)

So I must read it to one string (public for all at any time).. not to read it every time I want it..

So how to do it with VB6??


It is an urgent problem please!!!


Thanks alot..

Showing The Content Of Notepad File In A Text Box Control
Hi all,

Hope all in fine tune. Here I am uploading a text file. What all I need is that I want to show the content of the file in text box control of a form with multiline set to true and scroll bars to both. But the contents are coming in the control but are compressed to a new line and the alignments are going off. My requirement is to show the contents exactly in the same way as it appears in the notepad file when maximized.Please help me as a project is withheld for this code.

Help me Plzzzzzzzzzzzzzzz

Thanx in advance

How To Display The Content Of Text File In The Data Report?
Hey dude,

I want to to show the content of the text file in the data report. Can you please let me know that how can show the text file stuff in the data report.

code snippets will be prefered.

Thanks I am eagerly waiting for your reply.

please. help me.

Thanks


Kamlesh Gujarathi
kamlesh@itshastra.com

Fly always to the SKY. You can do anything if you TRY. ;)

Reading The Content Of A Text File Via Line Input, Backwards!
I am using Line input to read the content of a txt file into a listbox. As each line is read in, a function is called upon to check for something. It would be very helpful if I could read the text file in reverse, so the first line is read last.

Is there a way to do this?

Thanks!

Sort Text File
Hi guys,

It's me again.....
Maybe this site has spoiled me a bit, but you guys always comes up with the best solution....

I want to be able to sort a text file....
I the text file there FirstName, LastName, address, etc.
I want to sort the file by LastName...

Can someone point me to the right direction?

Thanks in advance for all your help.....

Read Text File And Sort
Hello, I'm trying to read 20 numbers from a text file as integers, and sort them.

I'm absolutely STUMPED after I've gotten this far. Could someone take a look at my code and help me out?


I realize that some of my code may be all over the place - if someone can help me organize or fix it it would be greatly appreciated.




Code:
Private Sub Command1_Click()
' Defining

Dim iStartPoint As Integer, vTemp As Single
Dim lItem As Long, lCtr As Long, lCtr2 As Long

Dim vVal As Single
Dim vOrigArray As Single

Dim vAns As Single
Dim Numbers(1 To 20) As Single

Dim lNumSorted As Long
Dim lMax As Long
Dim FName As String
Dim tmpnum As Single


' Write this file to List1 and sort it
Open "H:ICS4M1Full Sorter
umnum.txt" For Input As #1

i = 1
Do While Not EOF(1)
Input #1, Numbers(i)
i = i + 1

Loop

vOrigArray = vAns
iStartPoint = LBound(vAns)
lMax = UBound(vAns) - 1

lNumSorted = 0

For lItem = iStartPoint To lMax

vVal = vOrigArray(lItem + 1)

For lCtr = iStartPoint To lNumSorted
If vAns(lCtr) >= vVal Then Exit For
Next

For lCtr2 = lNumSorted To lCtr Step -1
vAns(lCtr2 + 1) = vAns(lCtr2)
Next

'insert new item

vAns(lCtr) = vVal
lNumSorted = lNumSorted + 1
Next

SortedArray = vAns

errorhandler:
SortedArray = vbEmpty

Close #1
End Sub

Text Box / TxT File Sort Code
Can anyone give me the code to put the contents off a text box from highest to lowest (Sort) or sort a text file

Example:
7 - Ash Kri
9 - Kay Wells
8 - Bert Winn

Becomes:
9 - Kay Wells
8 - Bert Winn
7 - Ash Kri


my quiz saves the name from the first form to a text file, so the first line is the name, then from the last form it saves the score so the second line is the score.

Kay Wells
9
Bert Winn
7

So basically i want vb on the last form to organise the contents of an external file in to order of highest first or vb to organise the contents of a text box.

To save to file i use this code:


Code:
Private Sub cmdCal_Click()
Rem Replace 'c: est.txt' with the name of the file you want to edit.
Open "c: est.txt" For Append As #1

Print #1, lblResult.Caption

Close #1

End Sub


And to display the contents i use this:


Code:
Private Sub cmdHighScores_Click()
Rem Change "c: est.txt file to change what contents are displayed in the text box"

Dim iFile As Integer

iFile = FreeFile
Open "C: est.txt" For Input Access Read As #iFile
txtFile.Text = Input(LOF(iFile), #iFile)
Close iFile
End Sub


confused:

Cheers ppl

Sort Large Text File
Hello All

I am trying to do a sort on a very larger text file, approx 75 MB. I have implemented the code below, but I am having a problem copying the file at the end of the run, I get a 75 file access error. Is there a reason why I cannot copy the file even though I closed both of them?

By the way is there a better way of doing this beside a bubble sort?

Thanks Steve


VB Code:
Private Sub ProcessFile()Dim SortComplete As BooleanDim BeginRead As BooleanDim SrcFileNum As IntegerDim SrcFilePath As StringDim DesFileNum As IntegerDim DesFilePath As StringDim SrcString1 As StringDim SrcString2 As StringDim i As LongDim j As Long        Do While SortComplete = False                SrcFilePath = "c:Combined.txt"        SrcFileNum = FreeFile        Open SrcFilePath For Input As SrcFileNum            SrcFilePath = "C: emp.txt"        DesFileNum = FreeFile        Open SrcFilePath For Output As DesFileNum                j = j + 1        SortComplete = True        BeginRead = True        Do While Not EOF(1)            DoEvents            If BeginRead = True Then                Line Input #SrcFileNum, SrcString1                Line Input #SrcFileNum, SrcString2            Else                Line Input #SrcFileNum, SrcString2            End If                        BeginRead = False                        If SrcString1 < SrcString2 Then                Print #DesFileNum, SrcString1                SrcString1 = SrcString2            Else                Print #DesFileNum, SrcString2                SortComplete = False            End If            i = i + 1            If i Mod 1000 = 0 Then Debug.Print "Run: " & j & ", Line: " & i        Loop        Print #DesFileNum, SrcString1                Close #SrcFileNum        Close #DesFileNum                DoEvents                FileCopy DesFilePath, SrcFilePath     Loop End Sub

Sort Structures From A Text File Assistance
I am trying to get started with a project in vb 2005 that loads an array of structures

Newbie Needs Help....sort Timefield In A Text File
I have a comma delimited text file and want to sort by the 4th column which is in 24hr format. Any ideas on the easiest way to do this. The single digit times do not have leading zero's. ex. 7:00:00 instead of 07:00:00.

Thanks in advanced!!!!
Kelly Mills

How To Read A Text File, How To Sort A List, How To Print
I have no idea how to complete this program, can anybody teach me please!!
But i have write some part in my program.(see my attach file)
i tried to put the score column in the last part of the list. but i can sort the score, and i don't know how to write a array in the program. Can anybody tell me how to fix it!!



Code:
Private Sub sort_Click()



Dim strListItem As String

Dim i As Long



For i = 0 To pLBName.ListCount - 2

Do While pLBName.List(i) > pLBName.List(i + 1)


If pLBName.List(i) > pLBName.List(i + 1) Then

strListItem = pLBName.List(i)

pLBName.List(i) = pLBName.List(i + 1)

pLBName.List(i + 1) = strListItem

i = 0

End If
Loop
Next
Label1.Caption = pLBName.List(0)
Label2.Caption = pLBName.List(25)

End Sub

Private Sub read_Click()
pLBName.Clear

If Dir("CIC_Current_List.txt") = "" Then
MsgBox "File not found"
Exit Sub
End If

Open "CIC_Current_List.txt" For Input As #1
Do While Not EOF(1)
Input #1, a, b, c, d

pLBName.AddItem "Score:" & d & " ,ID:" & a & " ,First Name:" & b & " ,Last Name:" & c



Loop
Close #1
End Sub

Private Sub exit_Click()

Unload Me

End Sub

Included with this test is a file (CIC_Current_List.txt) that contains the details of some students enrolled for a unit at Curtin International College. The file is composed of four columns: the first contains the ID for each of the students, the second the family name, the third column holds the given name and the last column gives the score (%) for each student in the exam.

For this test you need to design an application that reads in the file CIC_Current_List.txt, rearranges the list in order of their scores (either ascending or descending – you choose) and prints out the rearranged file. The user can then ask for the details of the most successful student and the least successful student to be displayed (you choose how this is done) and the user can also ask for the average score for all the students.

The details of how the application looks, runs, sorts and prints are left entirely up to you. Marks will be allocated for the professionalism of the displays, proper documentation of the code, sensible naming conventions and error messages/windows that will help the user etc.

Open Text File In To Excel And Sort The Data
Hi Guru(s),
I am in process of automating a repetitive work and need to open text files in to excel and plot the graph.

Any sample codes for this.

Thanks in advance.

Giri

Need Bubble Sort To Read Two Seperate Text Files And Sort Data Into One List
I have two seperate text files, have to read the data from both, such as:

(file one)
2, Tom
5, Bill
3, Tony
7, Charlotte
1, Pedro
etc.

(file two)
6, Penelope
8, Joann
4, Mark
10, Jose
9, Gerald
etc.


Then open, read and sort the two files, then put that data into combined order (by the number) to come out as one list:

1, Pedro
2, Tom
3, Tony
4, Mark
5, Bill
6, Penelope
7, Charlotte
8, Joann
9, Gerald
10, Jose
etc.

My exposure so far with Bubble Sort has been comparing and sorting words that were entered into text boxes. That is the only code I have and does not match this current scenario. Need help with code on opening both files simultaneously and then bubble sorting. I know this needs to be an array.

Can someone tell me what to do or show a similar example I could follow? Thank you for any help.

Little Dilemma With "user-defined Data Types + Bubble Sort + Text File"
I seem to be in a little dilemma!
Three elements:
User-defined data type
Type PhoneRec
PH as Single
Name as String *15
End Type

Listbox
Lists the phone numbers

Textfile
933215,”Fred”
965458.”Barney”
9314587,”George”

------------------------------------
I’m trying to bubble sort the listbox, but when I do I get “zeros” instead of the phone numbers. I know how to bubble sort, but when using a textfile I am having trouble.
*i don't want to use the Sort = true property, because the linked data (names) do not get sorted with the phone numbers*


/----Module---
Public Sub BubbleSort(Number() As PhoneRec)
Dim pass As Integer, n As Integer
Dim temp As Single

For pass = 1 To (UBound(Number) - 1)
For n = 1 To (UBound(Number) - 1)
If Number(n).PH > Number(n + 1).PH Then
temp = Number(n).PH
Number(n).PH = Number(n + 1).PH
Number(n + 1).PH = temp
End If
Next n
Next pass

End Sub
---Module---/

/---Form---
Option Explicit
Dim Phone() as PhoneRec

Private Sub cmdSort_Click()
Dim i As Integer

Call BubbleSort(Phone)
Call lstPHNumbers.Clear
For x = 1 To UBound(Phone)
Call lstlstPHNumbers.AddItem(Phone(i).PH)
Next
End Sub
---Form---/

may anyone know a remedy to my problem, i would be very thankful!

TextBox.text Content Retreival Of A Portion Of Text
Hi all,
I am stuck at a place where i have a text of 9 char length.
I need to retrieve the middle 3 characters....
eg:-
123456789
i can retrieve the first 3 characters(123) using the
Code:left("123456789",3)command
and retrieve the last 3 using the
Code:right("123456789",3)command

but how do i get the middle 3 characters(i.e. 456) extracted??

here is what i tried.

Code:str1 = txtBackground.Text
'store contents into a variant variable
str1 = Replace(str1, Left(str1, 3), "")
'replace the first 3 chars with ""
str1 = Replace(str1, Right(str1, 3), "")
'replace the last 3 chars with ""
finalstr = str1
'the final string in above example(456)

but, result of above operation is ""

any help shall be appreciated...
Please help me fast.
Thanks in Advance.


P.S.: I DONT WANT TO USE THE MID FUNCTION
------------------------------------------------------------------------------------------------

www.Tech-Arena.com/forums
The Indian Perspective Of Technology.

Edited by - Crazycoder on 9/19/2004 3:14:39 AM

Read Line By Line Of Text File And Move Content To Excel Record By Record
Hi,
   i am trying to move the selective information in the text file to Excel sheet record by record using VB.Can u help me in this regard.

The contents in text file is like:

"http://www.commerx.com/contact.html","inforequest@commerx.com"
"http://www.commerx.com/contact.html","ClientSupport@commerx.com"
"http://www.commerx.com/services-intranets.html","intranets@commerx.com"
"http://www.davacosourcing.com/company/","bignews@davacosourcing.com"
"http://www.davacosourcing.com/company/","careers@davacosourcing.com"
.
.
.
.
.
.

The above information need to be moved in Excel sheet record by record as:                    
http://www.commerx.com/contact.html        inforequest@commerx.com    
http://www.commerx.com/contact.html        ClientSupport@commerx.com    
http://www.commerx.com/services-intranets.html    intranets@commerx.com    
http://www.davacosourcing.com/company/ bignews@davacosourcing.com
http://www.davacosourcing.com/company/ careers@davacosourcing.com
.
.
.
.
..

Please do help in this regard as there are more than 1000 information that has to moved in the above pattern.

Thanx
babu


 

[RESOLVED But Still Open For Ideas] Ideas To Break A Huge Form Into Smaller Ones
I'm back in VB6 again!

I have this HUGE form with hundreads of controls and code. This form is mainly an assembly of 3 loosely related parts that could have been devided into 3 or more smaller forms.

Previous programmer tried to put everything in a single form and it became a debugging nightmare. He didn't follow any standard naming conventions and has used a control array of about 100 textboxes. Each textbox is bound to some data field (from 6 tables). And there isn't a single line of comment to describe them.

I'm looking for an Add-in that can print current line on debug window when you hit F8. (Or any way to print control flow.)

I think that way I'll be able to mark the codes and controls needed by each of the 3 main events. That way it will become easy to separate codes from each other.

Any other tips or ideas ?

Edit: Wow ! 2500 posts.

Ideas On Howto Get Windows Text
HI.

I could use some ideas on a good way to do this

1.) From cursor position, inside any window get the text that the cursor is over (word, sentance, or paragraph).

Ideas, or even code if you have it on hand! Thanks!

Select The Content Of A Text Box...
Is there a way to select the content of a text box when this textbox got the focus???


FadeOut

Deleting Content Of Text Box
When I delete the content of text box in a form and update the recordset... I get the next error: Multiple step operation generated errors.
However if I don't delete that content... then, the next code works perfectly.

Private Sub Command_Click()
DE.rscmdGrupos.CancelUpdate
DE.rscmdGrupos.Fields("Fechafin") = Null
DE.rscmdGrupos.Update
If Not (DEGesact.rscmdGrupos.BOF And DEGesact.rscmdGrupos.EOF) Then
DEGesact.rscmdGrupos.MoveFirst
End If
End Sub

PD.- I work all the time with Data Environment attached SQL-Server
Please, help me. Thanks

How To Scroll Text Box Content?
I WAS WONDERING HOW TO SCROLL THE TEXTBOX CONTENT WITH UP SIDE DOWN?

I HAVE ALREADY SET THE TEXTBOX PROPERTY TO MULTILINE.

THEN WHAT ELSE I NEED TO DO?

I HAVE TRY OUT USING THIS:

TEXT1.SCROLLBAR=2

BUT NOTHING HAPPEN BUT ERROR MESSAGE POP UP~

ANYBODY CAN GIVE ME A CLUE,WHAT IS THE CODING FOR SCROLLING THE TEXT CONTENT UP AND DOWN...??

Text Box Content Format
Is there a way to have the data in a text box formatted in Excel? I am pulling data from cells on a worksheet with a specific format (i.e. telephone number). But when it appears in the text box in my custom form it drops all formating. So if I update the data in the userform and try to apply the changes to the worksheet it over writes the original formatting so it's a real pain.

I need to find a way to force the Form's Text Box to alter the format of the data within it.

Any Suggestions?

Thanks,
Adam

Get Text Content Of Any Window
hi

ive searched the net and the forum for the answer, but i've found nothing,
but getting text from a window of a specific class (witch i allready know how to do).

i'm writing a screen-reader, and i need to be able to get the text content of any window the mouse pointer is over.

for ex. if a mouse is over a "document part" of the MS Word application, it gets the content of the document.

i could also live with the option of selecting the text - u guess that would be easier to do. besides ive done something simmilar in the past.
i was using GetAsyncState (or something like that) to get last pressed key (this includes mouse buttons). ive checked if the mouse was pressed, and released (with no in betwen events), and if so, i was sending "CTRL+C" and getting the selected text from the clipboard, but that is what i would like to avoid - the clipboard.

so if anyone has an idea how to achive option one or option two (same as described, but without clipboard) please share with me.

thanks in advice.

How To Tell Whether An RTF String Has Text Content
I need to be able to tell whether a given string consisting of RTF contains actual text. Obviously, len(anRTFString) won't work. Any ideas?

Printing Content Of Text Box
I would like to print contest of text box , but when I print it with printer object it is all in one line. I what that it looks same on paper as in text box on screen.
Thanks !

Ideas Required For This One (Matthew Gates Any Ideas?)
I have a bit of a dilemma, its in the Database forum, heres the link check it out.
http://forums.vb-world.net/showthrea...threadid=44279

Cheers
BW

Searching For Text Files By Content
Can anyone please tell me how I can search a directory containing a number of text files and return a collection of those containing certain keywords. I have a large number of files that need to be sorted into various directories based on their content and a program to do this would be very useful.

Thankyou all
BlackDove

Text Content Of Powerpoint Document
Hi!

Can anyone give me an idea on how I will be able to extract the text content of a PowerPoint File?

A simple code in Visual Basic Would be very much apprecited.

Regards,
Ian


IANIAN

Text Box Content Comparison &lt;RESOLVED&gt;
I would like to ask the following question:

Suppose I have three textboxs called Text1, Text2 and Text3
In VB I do the following comparison:


VB Code:
If Text1.Text > Text2.Text Then   Text3.Text = 1Else   Text3.Text = 0End If


The funny situation is that:
When Text1 Textbox contains 50, and Text2 Textbox contains 6
Text3 Textbox output is 1. i.e. 50 < 6 ??
What happened on it?

P.S. I have tried using 2 Combobox as selection input and 1 Textbox as output. It is correct!!

Want To Print And Fax The Rich Text Box's Content.
Hi All,

I have created an application with a RichTextBox control on the form.
I need that user can print the content of Richtextbox.

I added Common Dialog box in my form and able to generate the print dialog box but unable to print only Rich Text box content.

Similarly if the user need to fax or email the content what control and coding i should add?

Thanx,
Saurabh

Copying Web Page Content (text)
Is there an easy way to copy the contents (text only) of a web page using the WebBrowser OCX and import it into your VB App like, for instance, into a string? Thanks in advance.

Copyright © 2005-08 www.BigResource.com, All rights reserved