Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing Word
Message
De
29/03/2000 09:41:00
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Printing Word
Divers
Thread ID:
00352065
Message ID:
00352065
Vues:
46
I have an app that prints multiple Word documents in succession. The code goes a little something like this...

range = "999"
from = "1"
to = "999"
oword = CreateObject("Word.Application")

dimension filelist(1)
filecnt = adir(filelist, print_dir + alltrim(print_spec))

dest_file = dest_fn(filelist(n,1))
print_file = print_dir + filelist(n,1)

if filecnt > 0
for n = 1 to filecnt
WITH oword
.Documents.Open(print_file)
.ActiveDocument.PrintOut(0,0,range,"",from,to)
.Quit
ENDWITH
delete file (print_file)
endfor
endif

The problem is that I get an error on the second pass through that says: Member DOCUMENTS does not evaluate to an object. What does this mean? More importantly- How do I fix it.
So I guess I dont REALLY have an app that prints multiple Word docs in succession. I have an app that prints 1 Word doc and then breaks really bad.

Thanks in advance...
Tom Welch
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform