+ Reply to Thread
Results 1 to 17 of 17

Voucher printing from Excel

  1. #1
    Registered User
    Join Date
    01-04-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    11

    Voucher printing from Excel

    Hello all,

    I need help with multiple voucher printing from excel.

    In sheet No.2 I have following data:
    In Column A, I have put approx 2000 dates (dd-mm-yyyy).
    I have voucher nos in Column B (approx 2000 voucher nos).
    In column C, I have different description in each Cell.
    IN column D, I have amount of voucher.
    In column F, I have name of the person to whom I am paying. This could be few cells.
    In column H, I have mentioned the reason for the payment. This also could be few cells as nature of work can be common.

    In Sheet No.1 I have format of voucher (A5 size)

    I want a vba or a method for printing to PDF/Or printer attached, all the above voucher in the format in Sheet No.1

    Sample Data is as follows:

    In Cell A1 -> 04 Apr 2017

    In Cell B1 -> VCH0005

    In Cell C1 -> "Being amount paid to "

    In Cell D1 -> 500.00

    In Cell F1 -> "Mr. John Doe"

    In Cell H1 -> "for carrying goods from our office to some other office"

    On the click of a button the above data will be printed in a particular
    format which is designed in Sheet1 A5 size or A4 size.

    Please help.
    Thanks in advance.

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,964

    Re: Voucher printing from Excel

    Hi Shahidr100

    This code should sort you out...See attached sample workbook.Have not designed voucher but you will get the idea of how to populate the voucher and print
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Sintek; 04-08-2017 at 09:14 AM.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,964

    Re: Voucher printing from Excel

    If you like you can design the voucher in your format and I will adapt the code to Auto populate and print

  4. #4
    Registered User
    Join Date
    01-04-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Voucher printing from Excel

    Hello Sintek

    Thanks for the help.

    I'll work out on the code you have sent. I'll update if i succeed.
    Thanks once again

  5. #5
    Registered User
    Join Date
    01-04-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Voucher printing from Excel

    I am sorry if I have done something wrong AliGW. I havent posted this question in the same forum at other place i guess.

    Plz let me know how it can be solved.
    Regards

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,301

    Re: Voucher printing from Excel

    You have to provide a link to where you asked the question on another forum. I will do it for you this time, as a courtesy, but in future you must do it yourself.

    You HAVE posted the same query here: https://www.mrexcel.com/forum/excel-...ing-excel.html
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    01-04-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Voucher printing from Excel

    Hello Sintek

    I have altered the code little bit and it seems to be working. I have following three concerns right now.
    1. As I am printing to PDF, each time I have to specify the file name. Isn't there any method where it prints all the vouchers in one file?
    2. The narration can me more than one line long. Can we divide it into multiple lines through code? We can break the line by using " " as delimiter.
    3. Figure to words code.

    I am more concerned with point 1 above.

    I have attached the xlsm file.

    Thanks and regards
    Attached Files Attached Files

  8. #8
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,964

    Re: Voucher printing from Excel

    Hi shakidr100

    I am not able to recreate your scenario so cannot assist unfortunately. Why print to PDF?
    Try this link and see if they can assist...not sure what pdf converter software you are using.
    http://www.ozgrid.com/forum/showthread.php?t=47649

  9. #9
    Registered User
    Join Date
    01-04-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Voucher printing from Excel

    Hello sintek
    Finally I have managed to do what I wanted to do.
    I am attaching the excel file for other users.

    All I need now is the code for figures to words and breaking the narration into multiple parts.
    I am working on it. Will update if I achieve my goal.

    Thanks to all of you for the help.
    Regards
    Attached Files Attached Files

  10. #10
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,964

    Re: Voucher printing from Excel

    Nice one shahidr100

    You taught me something as well.

  11. #11
    Registered User
    Join Date
    01-04-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Voucher printing from Excel

    Hello Sintek,

    I am glad that I was of help to you and people like me who will visit this post in future

    Regards

  12. #12
    Registered User
    Join Date
    01-25-2019
    Location
    Visakhapatnam
    MS-Off Ver
    2010
    Posts
    3

    Re: Voucher printing from Excel

    Excellent Post I will try with my requirements Thank You All.

  13. #13
    Registered User
    Join Date
    01-25-2019
    Location
    Visakhapatnam
    MS-Off Ver
    2010
    Posts
    3

    Re: Voucher printing from Excel

    Hello Sir,

    In your Attachment there is no print button option if you can send again with that it will be help full. I am new to excel so i am not aware of the coding.

    Thank You very much

  14. #14
    Registered User
    Join Date
    01-04-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Voucher printing from Excel

    Hello Naresh,

    I am glad that you liked the post.

    You will not find the print button on the worksheet.

    There is a macro which is running in background so to print you have to do the following:

    Open the worksheet and click press Alt+F8. A window opens. Make sure CreateVoucher Function is selected. Click on Run.

    It will ask you to save/print the file.

    I hope that helps.

    Regards
    Shahid.

  15. #15
    Registered User
    Join Date
    01-25-2019
    Location
    Visakhapatnam
    MS-Off Ver
    2010
    Posts
    3

    Re: Voucher printing from Excel

    Hi Shahid,

    Thank you very Much for your response.

    I click press Alt+F8. As you said and followed the instructions its directly Printing the voucher its not requesting for any Save option.

    If you figured the option for Number to word format it will be very helpful for me if you could upload the excel once again.

    Thanks & Regards
    Naresh

  16. #16
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,971

    Re: Voucher printing from Excel

    Naresh1211,
    Unfortunately your post does not comply with Rule 4 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Ben Van Johnson

  17. #17
    Registered User
    Join Date
    01-04-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Voucher printing from Excel

    Hello Naresh,

    You will have to install PDF printer in order to print to PDF.

    If you do not have PDF printer, follow my Youtube channel to download, install Ghostscript and configure it to print to PDF for free.

    Go to youtube and search with "how to print to pdf from windows 10 shahidr100". I guess you will reach my channel.

    If you do not want to print to PDF at all then I'll send you the excel file after disabling the print option so that you can print to the printer of your choice.
    I'll include number to word option also in that.

    Let me know plz.

    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Payment Voucher link to Import
    By jp16 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-31-2017, 01:34 AM
  2. Using Excel to Match Inventory to Voucher
    By alssports in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-02-2014, 02:41 PM
  3. salary voucher
    By makhdoomliaqat in forum Excel General
    Replies: 4
    Last Post: 09-28-2013, 07:56 PM
  4. Check Voucher Template
    By nand847 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-18-2006, 11:10 PM
  5. Printing of voucher
    By Cheryl in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-25-2006, 05:45 PM
  6. [SOLVED] gift voucher tracking
    By Shea in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-23-2005, 11:05 AM
  7. [SOLVED] How do you create voucher number in excel
    By cole in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 03-20-2005, 05:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1