Results 1 to 11 of 11

Thread: Printing Labels

  1. #1

    Thread Starter
    Hyperactive Member mastermind94's Avatar
    Join Date
    Jun 2000
    Location
    Montréal, Canada
    Posts
    441

    Arrow

    I need to print text on paper label (e.g. Avery Labels). Where can I found an OCX or coding???

  2. #2
    Hyperactive Member Asaf_99's Avatar
    Join Date
    Jul 2000
    Location
    Israel
    Posts
    335

    <?>

    What do you mean???
    (I'm imetating HeSaidJoe!)
    Asaf Sagi

    ICQ: 61917199
    E-Mail: [email protected]

  3. #3

    Thread Starter
    Hyperactive Member mastermind94's Avatar
    Join Date
    Jun 2000
    Location
    Montréal, Canada
    Posts
    441

    Arrow

    What I mean is you know in Micro$oft word, you can print label and set the dimension stuff. But, How can I do that on VB5?

  4. #4
    Addicted Member jeroenh's Avatar
    Join Date
    Aug 2000
    Location
    Rotterdam, Holland
    Posts
    201
    I do not have the answer. I'm just putting a post in this thread to recieve a notice when someone does have the answer.

    I'm currently doing the same thing you want, but I use word for it. It would be a lot better if Word would be replaced with code that does the same. Then more people are able to use my program to print labels.
    Catch you later,

    Jeroen Hoekemeijer
    Code:
    If 1 = 2 Then MajorError

  5. #5
    Guest
    i have created just such a program
    using the Printer Object and a lot
    of math to figure out the spacing
    and dimensions of the inside of
    the label to print on.

    you need to use
    currentx and currenty...






  6. #6
    Addicted Member jeroenh's Avatar
    Join Date
    Aug 2000
    Location
    Rotterdam, Holland
    Posts
    201
    Larryn,

    Might it be possible for you to give me a small example of this code. I have never worked with the Printer Object in VB. I want to learn.

    Might be possible to send it to [email protected] You have my everlasting gratitude.
    Catch you later,

    Jeroen Hoekemeijer
    Code:
    If 1 = 2 Then MajorError

  7. #7

    Thread Starter
    Hyperactive Member mastermind94's Avatar
    Join Date
    Jun 2000
    Location
    Montréal, Canada
    Posts
    441

    Unhappy

    I'm a beginner!!! I did a think but, it cannot do the label dimension. Please, help!


    ---------------------------

  8. #8
    Guest
    I did a similar thing recently - printed out labels. I used the VideoSoft VSPrinter OCX, which is a very nice little printing control (much much easier to work with than the printer object), and wrote a small label designer that let you drag and drop the labels etc.

    It's not a difficult job.

    Basically you need to define a series of RECT type that specify the positioning of a given bit of text for a SINGLE label, all wit hco-ordinates that are based on the top left of the labal. Then work out how many labels you have per page, and loop thoug all the labels and offset the colection of RECTs you created earlier, print text at that current X and Current Y, and voila! - Label printing.

    But it does take a bit of work, particulalrly the label defintion section.

    I know this post won't be much help, but it can be done with some effort.

    - gaffa

  9. #9

    Thread Starter
    Hyperactive Member mastermind94's Avatar
    Join Date
    Jun 2000
    Location
    Montréal, Canada
    Posts
    441
    Where can I get that OCX? Is it free???

  10. #10
    Guest
    Larryn had a good suggestion in which you would use CurrentX and CurrentY.
    Code:
    Printer.ScaleMode = vbInches
    'Set a 1"x 1" margin
    Printer.CurrentX = 1
    Printer.CurrentY = 1
    Printer.Print Text1.Text
    Printer.EndDoc

  11. #11
    Guest
    It not just as straight forward as using currentX and CurentY. You need to get nice and comfortable with TextWidth, TextHeight, and a few others, so that you can handle text wrapping correctly (or not at all depending how you want your labels to print).

    The videosoft OCX is not free. In fact its reasonably expensive - about $300US I think, but still an excellent control, particularly if you want print preview and all that stuff. If your programming byyourslef, the its probably not worth it. I got it cos I do a fair bit of reporting and printing as paert of my job

    - gaffa

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