visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
316 experts, 1194 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Languages :: Java :: doc files


By: progGoon U.S.A.  Date: 22/05/2003 00:00:00  English  Points: 50 Status: Answered
Quality : Excellent
how i display doc files in textbox or richtextbox?
or i want to see a prievew of doc,ppt,or excel file when i click them.
By: VGR Date: 22/05/2003 21:50:00 English  Type : Answer
you can't. The DOC files should be RTF files in fact.
A RTF file may be renamed ".DOC" with no problem for Word, and a RTF file is displayable in a richtextbox
By: DaMann Date: 22/05/2003 22:36:00 English  Type : Comment
Sub POLISHER()
'How to read a text file into a text box. '-----
' Here's how to read a text file into a text box control in one gulp.
Dim FileName As String
Dim f As Integer
FileName = "c:\bpcspc\polisher.txt"
f = FreeFile 'Get a file handle
Open FileName For Input As f 'Open the file
TextBox1.Text = Input$(LOF(f), f) 'Read entire file into text box
Close f 'Close the file.

End Sub
This is a working method.
By: digitaltree Date: 22/05/2003 23:14:00 English  Type : Comment
DaMann that will not work for doc files because they are not entirely
ascii files. They also consist of a lot of binary data because of the
formatting that word does. To pull it in to a textbox or richtextbox
you would have to first open the doc file and scan through it for any
ascii values and pull each successful find into another virtual file
then display that file in the text/richtextbox. I'll see if I can dig
up any of my old code on this later when I'm back on my machine instead
of here at work.
By: DaMann Date: 22/05/2003 23:25:00 English  Type : Comment
you are correct, i miss read. thought was refering to a text file,

My apolligies.

DaMann
By: kimbaz Date: 11/06/2003 21:15:00 English  Type : Comment
Mmm convert a Word document to text file is quite complex... You can do
this. Add an OLE object to your project. Then you by code load your
doc, excel, or power-point in your ole object.
To edit it use this code:

'After load document

OLE1.Verb=-5
OLE1.Action=7

'To save you Word document to a file:
OLE1.object.SaveAs "C:\temp.doc"

'To close the document
OLE1.Action=9

Check if after this command all word session are close
Sorry for my bad english...

Do register to be able to answer

EContact
browser fav
page generated in 388.791080 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page