I've made the form and the command buttons, but can't figure out the code to
make this event happen.
Can anyone help?
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Guyle M. Taber
Web: www.gmtech.net
Email: gu...@gmtech.net
________________________________________________________________
Option Explicit
Private Sub Command1_Click()
Dim hFile As Integer ' File Handle
' Get the next available file handle
hFile = FreeFile
Dim strBuffer As String 'dimension a string for the file input
' Open the file
Open "YourCDtxt_docfile.txt" For Input As #hFile
'Read the file into the text box
Text1.Text = Input(LOF(hFile), hFile)
' close the file
Close hFile
End Sub
__________________________________________________________________
Hope this helps,
Cliff
--
****************************************
ICQ - 16957341
****************************************
If I had to live my life again, I'd make
the same mistakes again--ONLY SOONER!!!!
****************************************
Last night I dreamt I ate a 10 pound
marshmallow, when I woke up my pillow
was gone.
****************************************
e.z.
In article <749iap$9...@enews2.newsguy.com>,
"newsguy" <gu...@gmtech.net> wrote:
> I'm new to VB and am trying to make a CD-ROM Resume application. The form
> will have several buttons on it. One button that the user can click on
> should open a .txt or .doc file on the CD for viewing onscreen.
>
> I've made the form and the command buttons, but can't figure out the code to
> make this event happen.
>
> Can anyone help?
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Guyle M. Taber
> Web: www.gmtech.net
> Email: gu...@gmtech.net
>
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>Try "winword xxxx.doc" in your shell() statement, where xxxx.doc is the full
>path of the word document file name.
>
>e.z.
>
You could also just embed the text document, and the word document
into the form the OLE Control in VB6 (could be in eariler versions,
but 6 is all I used), and choosing to Create from File. If you prefer
for the Word and Text Icons not to be displayed, you could make both
of these invisable, and invoke the even from your command buttons.
Just a sugestion that seems better then looking up the WinWord path
location etc.. in the regerstry to insure that it will work properly.
-
Wrym "I might of just answered my first VB question.. WHOO" Enigma