Printing formated text
Printing formated text
(OP)
I want to make a program that captures text fields from the user and print the information formated in a heading letter. I want the name, address, sale concept, amount, tax, etc. in especific areas of the sheet.
Could you help me?
RE: Printing formated text
DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
RE: Printing formated text
RE: Printing formated text
Open ("C:\Temp\Report.txt") For Output As #1
Print#1, sNameVariable
Print#1, sAddressVariable
Print#1, The Rest of Your Variables
Close #1
DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
RE: Printing formated text
RE: Printing formated text
sPath = "C:\SomePath\"
sFile = "SomeFile.txt"
Call Shell("C:\WINNT\NOTEPAD " & sPath & sFile, 1)
Hope this helps...
DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
RE: Printing formated text
RE: Printing formated text
From MSDN:
Using the PrintForm Method
The PrintForm method sends an image of the specified form to the printer. To print information from your application with PrintForm, you must first display that information on a form and then print that form with the PrintForm method. The syntax is as follows:
[form.]PrintForm
If you omit the form name, Visual Basic prints the current form. PrintForm prints the entire form, even if part of the form is not visible on the screen. If a form contains graphics, however, the graphics print only if the form’s AutoRedraw property is set to True. When printing is complete, PrintForm calls the EndDoc method to clear the printer.
RE: Printing formated text
If this is a small in-house project, I think the notpad/shell method is the easy route to go, but if you need more power you may want to look into a third party text formatting/print preview control (or roll your own).