|
-
Apr 25th, 2000, 05:04 AM
#1
Thread Starter
Hyperactive Member
Can anyone tell me how to sequentially send text to a file and then print it out? Thanks in advance.
-
Apr 25th, 2000, 05:43 AM
#2
Thread Starter
Hyperactive Member
To clear things up...
In case I really wasn't clear, I just need to know how to print a document, I'm sure I could figure out how to send the text, I just need to find out how to print it.
-
Apr 25th, 2000, 07:18 AM
#3
New Member
You can use the Printer object directly, doing something like this:
dim sMyString as string
sMyString = "Hello World!"
Printer.Print sMyString
This will send the sMyString variable directly to the printer. Just use Printer.EndDoc to stop the buffer, and start the printing.
Daryl
-
Apr 25th, 2000, 09:03 AM
#4
Thread Starter
Hyperactive Member
What about a file?
What about a file? I am wanting to send a series a strings to a file, save that file, then print it using VB.
-
Apr 25th, 2000, 09:28 AM
#5
You can load the text into a string and then send it to the printer via the printer object
Printer.print mystring
Printer.enddoc
or load the file into a RichTextBox and use
RTB1.selPrint(Printer.hDC)
With the RTB you could add color or formatting or whatever
To open the file into a string look up the FileSystemObject and OpenAsTextStream
-
Apr 27th, 2000, 04:09 AM
#6
Thread Starter
Hyperactive Member
Thanks
Thanks, that one's been bugging me a while.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|