How to detect actual number of print copies sent from MSWord

Archived from groups: microsoft.public.windowsnt.print (More info?)

Hi! Am going nuts trying to determine how many print job copies has a user
selected from the print dialog in Microsoft Word. I'm writing a program that
monitors all print jobs and reports information (no. of pages, no. of
copies, etc.) to a server. It works perfectly with the printer and print job
API, getting the info from the DEVMODE structure (dmCopies, etc.), with any
application except for: guess what... Microsoft Word and Microsoft Excel.
Microsoft Excel reports n separate print jobs for a print job with n copies,
which is quite unique, no other app does this, and of course it spoils the
functionality of my program, but not in a fatal way.
Microsoft Word reports a single copy no matter how many the user is actually
printing, I couldn't find any way it actually tells the printer how many
copies does it want, and this of course completely ruins the functionality
of my program.
If anyone out there has encountered this abnormal functionality of these
applications and knows any way around this, please help.
Or maybe someone can at least explain to me why in the world all the
applications ever written comply to the Microsoft Printer API, except for
these two Microsoft Applications.

Thanks a lot,
Claudiu.
5 answers Last reply
More about detect actual number print copies msword
  1. Archived from groups: microsoft.public.windowsnt.print (More info?)

    "Claudiu Stoicescu" <claudiu.stoicescu@go.ro> wrote in message
    news:uvqsf4yjEHA.1344@TK2MSFTNGP11.phx.gbl...
    > Hi! Am going nuts trying to determine how many print job copies has a user
    > selected from the print dialog in Microsoft Word. I'm writing a program
    > that
    > monitors all print jobs and reports information (no. of pages, no. of
    > copies, etc.) to a server. It works perfectly with the printer and print
    > job
    > API, getting the info from the DEVMODE structure (dmCopies, etc.), with
    > any
    > application except for: guess what... Microsoft Word and Microsoft Excel.
    > Microsoft Excel reports n separate print jobs for a print job with n
    > copies,
    > which is quite unique, no other app does this, and of course it spoils the
    > functionality of my program, but not in a fatal way.
    > Microsoft Word reports a single copy no matter how many the user is
    > actually
    > printing, I couldn't find any way it actually tells the printer how many
    > copies does it want, and this of course completely ruins the functionality
    > of my program.
    > If anyone out there has encountered this abnormal functionality of these
    > applications and knows any way around this, please help.
    > Or maybe someone can at least explain to me why in the world all the
    > applications ever written comply to the Microsoft Printer API, except for
    > these two Microsoft Applications.
    >
    > Thanks a lot,
    > Claudiu.
    >
    >
    >
    >

    I wonder if this is related to the mopier function (supported by a lot of
    business class HP printers for example) -- the client sends one print job
    with an embedded code (generated by the print driver) and the processor on
    the printer itself reads this and prints the requested number of copies.
    Even though only 1 job and 1 copy was actually spooled. To get the true
    number you might need an API that somehow interfaces with the driver before
    it sends it to the spooler/printing subsystem. Obviously that's yucky
    especially if you have 20 different models of printers in service.

    Or it could be something completely different ;)


    --
    Colin Nash
    Microsoft MVP
    Windows Printing/Imaging/Hardware
  2. Archived from groups: microsoft.public.windowsnt.print (More info?)

    Well, it seems that indeed the only solution would be to hook on to some GDI
    API before the job is spooled. Yucky indeed.

    Thanks for your reply,
    Claudiu


    "Colin Nash [MVP]" <cnash x@x mvps.org> wrote in message
    news:OS9dbuikEHA.3912@TK2MSFTNGP12.phx.gbl...
    >
    > "Claudiu Stoicescu" <claudiu.stoicescu@go.ro> wrote in message
    > news:uvqsf4yjEHA.1344@TK2MSFTNGP11.phx.gbl...
    > > Hi! Am going nuts trying to determine how many print job copies has a
    user
    > > selected from the print dialog in Microsoft Word. I'm writing a program
    > > that
    > > monitors all print jobs and reports information (no. of pages, no. of
    > > copies, etc.) to a server. It works perfectly with the printer and print
    > > job
    > > API, getting the info from the DEVMODE structure (dmCopies, etc.), with
    > > any
    > > application except for: guess what... Microsoft Word and Microsoft
    Excel.
    > > Microsoft Excel reports n separate print jobs for a print job with n
    > > copies,
    > > which is quite unique, no other app does this, and of course it spoils
    the
    > > functionality of my program, but not in a fatal way.
    > > Microsoft Word reports a single copy no matter how many the user is
    > > actually
    > > printing, I couldn't find any way it actually tells the printer how many
    > > copies does it want, and this of course completely ruins the
    functionality
    > > of my program.
    > > If anyone out there has encountered this abnormal functionality of these
    > > applications and knows any way around this, please help.
    > > Or maybe someone can at least explain to me why in the world all the
    > > applications ever written comply to the Microsoft Printer API, except
    for
    > > these two Microsoft Applications.
    > >
    > > Thanks a lot,
    > > Claudiu.
    > >
    > >
    > >
    > >
    >
    > I wonder if this is related to the mopier function (supported by a lot of
    > business class HP printers for example) -- the client sends one print job
    > with an embedded code (generated by the print driver) and the processor on
    > the printer itself reads this and prints the requested number of copies.
    > Even though only 1 job and 1 copy was actually spooled. To get the true
    > number you might need an API that somehow interfaces with the driver
    before
    > it sends it to the spooler/printing subsystem. Obviously that's yucky
    > especially if you have 20 different models of printers in service.
    >
    > Or it could be something completely different ;)
    >
    >
    > --
    > Colin Nash
    > Microsoft MVP
    > Windows Printing/Imaging/Hardware
    >
    >
  3. Archived from groups: microsoft.public.windowsnt.print (More info?)

    It's not abnormal behavior. There are several ways of telling the print
    processor to print multiple copies.

    MS Word puts a devmode in the spool file and that devmode contains the
    actual number of copies.


    --
    Felix Maxa
    Windows Printing Team

    This posting is provided "AS IS" with no warranties, and confers no rights.


    "Claudiu Stoicescu" <claudiu.stoicescu@go.ro> wrote in message
    news:ejyeeCokEHA.3788@TK2MSFTNGP14.phx.gbl...
    > Well, it seems that indeed the only solution would be to hook on to some
    > GDI
    > API before the job is spooled. Yucky indeed.
    >
    > Thanks for your reply,
    > Claudiu
    >
    >
    >
    > "Colin Nash [MVP]" <cnash x@x mvps.org> wrote in message
    > news:OS9dbuikEHA.3912@TK2MSFTNGP12.phx.gbl...
    >>
    >> "Claudiu Stoicescu" <claudiu.stoicescu@go.ro> wrote in message
    >> news:uvqsf4yjEHA.1344@TK2MSFTNGP11.phx.gbl...
    >> > Hi! Am going nuts trying to determine how many print job copies has a
    > user
    >> > selected from the print dialog in Microsoft Word. I'm writing a program
    >> > that
    >> > monitors all print jobs and reports information (no. of pages, no. of
    >> > copies, etc.) to a server. It works perfectly with the printer and
    >> > print
    >> > job
    >> > API, getting the info from the DEVMODE structure (dmCopies, etc.), with
    >> > any
    >> > application except for: guess what... Microsoft Word and Microsoft
    > Excel.
    >> > Microsoft Excel reports n separate print jobs for a print job with n
    >> > copies,
    >> > which is quite unique, no other app does this, and of course it spoils
    > the
    >> > functionality of my program, but not in a fatal way.
    >> > Microsoft Word reports a single copy no matter how many the user is
    >> > actually
    >> > printing, I couldn't find any way it actually tells the printer how
    >> > many
    >> > copies does it want, and this of course completely ruins the
    > functionality
    >> > of my program.
    >> > If anyone out there has encountered this abnormal functionality of
    >> > these
    >> > applications and knows any way around this, please help.
    >> > Or maybe someone can at least explain to me why in the world all the
    >> > applications ever written comply to the Microsoft Printer API, except
    > for
    >> > these two Microsoft Applications.
    >> >
    >> > Thanks a lot,
    >> > Claudiu.
    >> >
    >> >
    >> >
    >> >
    >>
    >> I wonder if this is related to the mopier function (supported by a lot of
    >> business class HP printers for example) -- the client sends one print job
    >> with an embedded code (generated by the print driver) and the processor
    >> on
    >> the printer itself reads this and prints the requested number of copies.
    >> Even though only 1 job and 1 copy was actually spooled. To get the true
    >> number you might need an API that somehow interfaces with the driver
    > before
    >> it sends it to the spooler/printing subsystem. Obviously that's yucky
    >> especially if you have 20 different models of printers in service.
    >>
    >> Or it could be something completely different ;)
    >>
    >>
    >> --
    >> Colin Nash
    >> Microsoft MVP
    >> Windows Printing/Imaging/Hardware
    >>
    >>
    >
    >
  4. The problem exist.

    http://support.microsoft.com/kb/919736/en-us?spid=2530&sid=251


    I can resolve in Word 2003 but I can't in Excel.
  5. Ressurecting this post...

    How did you solved it?

    I'm having the same problem here, I've tried a lot of things but none worked...

    Thank you.
Ask a new question

Read More

Microsoft Word Microsoft Windows