Click to See Complete Forum and Search --> : Print contents of a Filebox


rknuppel
July 15th, 1999, 01:15 AM
Ok, I'm new here and this is my first post... Looks like a good site!!! I just want to print the contents of my filebox... I can get the files to open up in the filebox but can't get them to print? Can you even do this? I'm sorry for the stupid question but i'm just a beginner and really really really appreciate everyone's help!!! Thanks and any response would be great!

Ryan

Lothar Haensler
July 15th, 1999, 02:51 AM
what do you mean by "Filebox"? the FileListBox control?
If so, the "easiest" way to print files is IMHO by means of the ShellExecute API as in

dim lRet as long
lRet = ShellExecute( me.hwnd, "print", yourfilegoeshere,...)



This will launch the app associated with the file's extension and cause the started app to print the contents of the file.
If you call that function for a ".doc" file, WORD will be started and it will print the contents of the document.

rknuppel
July 15th, 1999, 10:20 AM
Ok, that's not really what I want to do. I want to print the whole list of FILENAMES!! Not the contents of a file. Like I have 150 files in a directory. I want to print the names of them files! Thanks though, any more thoughts?