Font & Tab setting in a Text PRN file

The background:
Sometimes using Popular Report writers becomes far more complex.

In such cases, I create Text string file say "myreport.txt" and then open it in WRITE.EXE for the purpose of printing. Also, user can change font style and size here. I use vbTab to define column position. e.g.
vbTab & "Division" & vbTab & "Name of Division" to display heading.
vbTab & strDivncode & vbTab & strDivnname to display data, so the report
looks as follows:

Division Name of Division
A1 Applied instruments divn,
B1 Bakery Divm.
C1 Chemicals Divn.
P1 Pharmacy Divn.

I use vbcrlf , vbVertivalTab etc. for linefeed etc. And it is working beautifully on all printers.

The Problem:
1. How do I set vbTab length in terms of say inches or no. of characters (later will be preferred). In WRITE.EXE, by default it is 0.5" and store it in this text file?

2. How do I store font info. inside this text file?

3. Will it work on all Dot Matrix printers and Injet printers?

4. Is there a documentation available about creating simple such
files or a simple Rich Text File?

Kindly advice.


Dilip Nagle
email-id is

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!