Christopher Lauer
Programmer
Good day,
I would like the ability to update a document each time it is printed via the Print dialog box when the User selects to print X copies. For example, when the user selects 2 copies, I need to run my code twice, once before the first print (I have figured this out using the DocumentBeforePrint() method) and then before the second print (where I am stuck).
I think this may not be possible as I think it is the onboard printer code that says print this same file X times, not Word that says send this document X times.
Project overview:
I am creating a word template (.dotm) that contains six “coupons”. I am prompting the user for Sale Price, Retail Price, Start Date, End Date and Starting Serial Number on Document_New(). I then populate the six copies of the coupon with the collated, validated, data; the Seral Number for each coupon is incremented by one so all six have a different seral number (1 – 6 if 1 is entered). This is working just fine.
I will need to print like 100 of these coupons and so it would be nice to say Print 17 copies so I only need to enter the coupon data once and have “code” update the six serial numbers on each copy.
What do you think? Is this doable in VBA?
My background:
I was a VB/VB.NET desktop and web developer for about 10 years then moved on to SQL Server Development and have been a SQL Developer and DBA for the past 5 years. I have not programmed in Office before. I can think of numerous ways to tackle this using SQL SSRS but this is for a Boy Scout troop and needs to be something I can “handoff” to the next leadership team. Office or Excel appears to be the “easy to use” way at this point.
I would like the ability to update a document each time it is printed via the Print dialog box when the User selects to print X copies. For example, when the user selects 2 copies, I need to run my code twice, once before the first print (I have figured this out using the DocumentBeforePrint() method) and then before the second print (where I am stuck).
I think this may not be possible as I think it is the onboard printer code that says print this same file X times, not Word that says send this document X times.
Project overview:
I am creating a word template (.dotm) that contains six “coupons”. I am prompting the user for Sale Price, Retail Price, Start Date, End Date and Starting Serial Number on Document_New(). I then populate the six copies of the coupon with the collated, validated, data; the Seral Number for each coupon is incremented by one so all six have a different seral number (1 – 6 if 1 is entered). This is working just fine.
I will need to print like 100 of these coupons and so it would be nice to say Print 17 copies so I only need to enter the coupon data once and have “code” update the six serial numbers on each copy.
What do you think? Is this doable in VBA?
My background:
I was a VB/VB.NET desktop and web developer for about 10 years then moved on to SQL Server Development and have been a SQL Developer and DBA for the past 5 years. I have not programmed in Office before. I can think of numerous ways to tackle this using SQL SSRS but this is for a Boy Scout troop and needs to be something I can “handoff” to the next leadership team. Office or Excel appears to be the “easy to use” way at this point.