Results 1 to 5 of 5

Thread: Printer.Print

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2001
    Location
    pa
    Posts
    58
    Printer.Print Tab(3); .lblOperationBC.Item(1).Caption; Tab; Tab; Tab; Printer.CurrentX; .lblOperationBC.Item(1).Caption

    I am trying to line up a column to print badges the size of id cards

    can anyone tell me how to get over to differents spots.

    like if i want to print "hello world" tab over a bit and print "hello world" again

    and the next line i want to print the same thing only with a number "1" instead of hello world. only i am doing it in a loop and need to make sure that i start the second column over far enouogh
    DAvid Rainey

  2. #2
    Lively Member
    Join Date
    Feb 2001
    Posts
    78

    Wink

    You can use Spc(#) to choose how many spaces you want before the next word. Or you can you the preset columns if you like. If you wanted a line to read:

    "Hello World Hello World"

    and the next line to read:

    "Hello World 1"

    You would use:

    Printer.Print "Hello World";Spc(10);"Hello World
    Printer.Print "Hello World";Spc(10);"1"

    Or you could use:

    Printer.Print "Hello World", ,"Hello World"
    Printer.Print "Hello World", ,"1"

    And the second "Hello World" form the first line would be lined up with the "1" from the second line.

    If you need any more help, or if I looked at your question wrong just let me know.


    I noticed that the spaces don't show up in my example, but there should be exactly 10 spaces between the seperate output.

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2001
    Location
    pa
    Posts
    58
    well the thing is i want the second column to be aligned at the same spot no matter what the length of the first collumn is
    first column--------second column
    hello world---------hello world
    1---------------------1


    and i need somehow to get the second column to start there.


    Note the ---- would be spaces or tabs not the - symbol
    DAvid Rainey

  4. #4
    Lively Member
    Join Date
    Feb 2001
    Posts
    78
    Ok, then just use the commas to seperate. Then they will be in seperate print zones.
    EXAMPLE:

    Printer.Print "Hello World", "Hello World"
    Printer.Print "Hello World", "1"

    Would have the second column lined up, since they are printing in seperate print zones. If what you are putting in Zone1 is too large (i.e. a full name) you will need to put Zone2 more print zones away for every comma you use the next item you send to print will move over one print zone. As far as I know the print zones are predefined and cannot be switched, unless someone knows how to do that.

    Matt

  5. #5
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736
    Use TAB(n) to tell the printer which column to print in.
    Code:
    Private Sub Command1_Click()
        Printer.Print Tab(10); "Hello World"; Tab(30); "Hello World"
        Printer.Print Tab(10); "1"; Tab(30); "Hello World"
        Printer.EndDoc
    End Sub
    The above code will print the first field in column 10 and the second field in column 30.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width