Track how many times a Word 2007 file is printed


hello,

i have word 2007 file track how many times it gets printed.

when open file , print it see printed on the hard copy print count. so if i printed file 5 times , open , print 6th time, it should display 6 on hard copy.

thanks...b 

update....i found macro below , created bookmark show number of prints.  however, possible assoicate or call macro when user attempts click on file>print or clicks printer icon?

when macro runs box appears prompting user enter number of "copies" send printer.

sub myserial()
    dim rngseriallocation range
    dim intserialnum integer
    dim strserialnum string
    dim doccurrent document
    dim intnumcopies integer
    dim intcount integer

    ' set ref current active doc
    set doccurrent = application.activedocument
    ' set ref bookmarked serial number
    set rngseriallocation = doccurrent.bookmarks("serial").range

    ' starting number
    intserialnum = val(rngseriallocation.text)
    ' number of copies required
    intnumcopies = val(inputbox$("how many copies?", _
      "print serialized", "1"))

    intcount = 1 intnumcopies
        ' print document
        doccurrent.printout range:=wdprintalldocument
        ' increment serial number
        intserialnum = intserialnum + 1
        ' put formatted version
        strserialnum = format(intserialnum, "00000")
        ' stuff proper place
        rngseriallocation.text = strserialnum
    next intcount

    ' reset bookmark, since updating procedure
    ' wipes out old one
    doccurrent.bookmarks.add name:="serial", _
      range:=rngseriallocation
end sub

haven't been able find method capture number of print copies.

how add macro button bind macro sample, and let users print document using button instead?


max meng
technet community support



Microsoft Office  >  Word IT Pro Discussions



Comments

Popular posts from this blog

some help on Event 540

WMI Repository 4GB limit - Win 2003 Ent Question

Event ID 1302 (error 1307) DFS replication service encountered an error while writing to the debug log file