Hi

I have an app that uses a word document.
I need to print 3 copies.
I have tried printout(,,3) but this does not work.
(word2003)
My code is

lcFileName='Paid-up endorsement LETTER M.doc'
loDocument=GETOBJECT(lcfileName)
loDocument.Activate

loDocument.Variables('billname').value=lcbillname
loDocument.Variables('billaddr1').value=lcbilladdr1
loDocument.Variables('billaddr2').value=lcbilladdr2
loDocument.Variables('billaddr3').value=lcbilladdr3
loDocument.Variables('billaddr4').value=lcbilladdr4

loDocument.Variables('insured').value=lcinsured
loDocument.Variables('polno').value=lcpolno



lodocument.fields.update
lodocument.printout

loDocument.application.quit(0)

RELEASE lonosave
RELEASE lodocument
RELEASE lcfilename

Please let me know where I have gone wrong. The above code works but only
prints one letter.

Thanks
Sherry

Re: printing word by Bernhard

Bernhard
Fri Apr 11 04:29:22 CDT 2008

Hi sherry,

> I have an app that uses a word document.
> I need to print 3 copies.
> I have tried printout(,,3) but this does not work.
According to VBA help, the Copies parameter is the 8th, so
printout(,,,,,,,3) should do the trick.
The 3rd parameter is the print range. Here you decide, whether the whole
document or only the current page or a range of pages etc. will be printed. This
is not the number of copies.

Other solution:
for i = 1 to 3
loDocument.printout
endfor

Regards
Bernhard Sander