Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP7 printing MS Word docs...strange behavior...
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00949887
Message ID:
00950604
Views:
16
Possibly right.
Appending all docs in one doc file and giving for a print& Wait, might work as good solution.




>Yes. We've tried it from several different computers on several different printers - and always have the problem. I think since most of this runs in a loop, that the oWord.Close() must be happening before the whole word document is sent to the printer ???
>
>>Hi Victor,
>>
>>Seems to me a printer buffer/Spooling/printer memory leak problem.
>>Which printer are you using and have you tried the same code on some other printer.
>>Check out.
>>
>>
>>
>>>I'm doing something like this....
>>>
>>>oWord = CREATEOBJECT("Word.Application")
>>>oWord.VISIBLE = This.debug_mode
>>>oWord.DisplayAlerts = .F.
>>>oWord.Documents.Open(FULLPATH(my_remote_view.Letter_Path))
>>>oWord.ActivePrinter = SET('printer', 3)
>>>oWord.ActiveDocument.PrintOut(.T.,,,,,,,my_remote_view.Copies*my_remote_view.letterprtcount)
>>>WAIT WINDOW 'Reseting tray...' TIMEOUT 3.0
>>>oWord.Close()
>>>oWord.Quit
>>>oWord = ""
>>>
>>>With the excpetion of the first 2 lines and the last 2 lines, this code is in a loop. My problem is that sometimes some of the word documents print out messed up. I haven't seen any pattern or consistancy to the problem either. About the only thing that seems consistant is that it's one particular font. Instead of a whole paragraph, it all prints out in a 1/4 inch tiny black blob...yet the next time you run it - it works fine - sometimes. And if you completely rerun all the documents - some of the ones that failed will work - and visa-versa. I've tried it on several different printers from several different machines - etc. etc. etc. I'm kinda clueless on how to trobuleshoot this problem and I really don't wanna have to tell the users "oh, just reprint those". Anyone have any ideas?
--
--
Aashish Sharma
Tele Nos: +1-201-490-5405
Mobile: +91-9821053938
E-Mail:
aashish@aashishsharma.com
write2aashish@gmail.com

You better believe in yourself... if you don't, who else will ?
TODAY is a gift, that's why it's called PRESENT
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform