J
Jchick
Boy, this should be a simple bit of code but I can't figure out how to
make it happen.
I have a CSV file shows up in a directory that has 4 fields that need
to be printed on labels. Each line of the CSV looks something like
this:
AcctNo, Name, junk, junk, Address, junk, PhoneNo
I need to read each line of the CSV and print them to Avery Label stock
(30 labels per sheet, 3 columns, 10 rows). I also need them to pull
from a specific tray on the printer.
The result should look something like this:
Jim Smith Mary Smith John Doe
123 any street 50 First st 12 Maple ST
8542115 12345678 9858574
555-555-1212 555-555-1111 555-555-2222
I am thinking the steps are something like this:
1. Watch the directory for a CSV file
2. Use StreamReader to read each line of the CSV
3. Drop fields 3,4 and 6 (the Junk fields)
4. Organize fields to this order: Name, address, AcctNo, PhoneNo
5. Select the appropriate tray of a specific printer
6. Print the records in 3 rows, 10 columns.
I know Word/Excel can read a CSV, do a mailmerge and output the labels
but my customer is interested in a VB.net solution.
Is this way too complicated? Any ideas on how to get started?
Thanks in advance.
make it happen.
I have a CSV file shows up in a directory that has 4 fields that need
to be printed on labels. Each line of the CSV looks something like
this:
AcctNo, Name, junk, junk, Address, junk, PhoneNo
I need to read each line of the CSV and print them to Avery Label stock
(30 labels per sheet, 3 columns, 10 rows). I also need them to pull
from a specific tray on the printer.
The result should look something like this:
Jim Smith Mary Smith John Doe
123 any street 50 First st 12 Maple ST
8542115 12345678 9858574
555-555-1212 555-555-1111 555-555-2222
I am thinking the steps are something like this:
1. Watch the directory for a CSV file
2. Use StreamReader to read each line of the CSV
3. Drop fields 3,4 and 6 (the Junk fields)
4. Organize fields to this order: Name, address, AcctNo, PhoneNo
5. Select the appropriate tray of a specific printer
6. Print the records in 3 rows, 10 columns.
I know Word/Excel can read a CSV, do a mailmerge and output the labels
but my customer is interested in a VB.net solution.
Is this way too complicated? Any ideas on how to get started?
Thanks in advance.