Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing a Word Document from VB

Status
Not open for further replies.

AkutaSame

Programmer
Oct 5, 2002
97
US
I have written a program in VB in which has a couple of buttons that print installation and manual documents. The program works flawlessly on my computer as well as the 5 others that I have tested it on (Win2k and WinXP machines). Another person runs the program and tells me it runs great. They then email me two weeks later and tell me they are receiving problems:

I get an email stating that when they click the print documents button that it prints, but that Word stays open and the document is there as well as a "Save As" box. I have hardcoded a close function to close the document and then the application, so this should not be happening. Regardless of whether they save the document or click "cancel," when they close Word, it gives a this error:

Run-time Error '5155':
Application-defined or object-defined error.

I have searched and searched on the web, even on the Knowledgebase (MS), and there doesn't seem to be ANY information on this particular runtime error.

Any Ideas? Think they just modified my code and bugged it? (they have the source)

Akuta
 
They could have messed with the source and accidentally deleted your close code...it certainly isn't unheard of. Also, do you know what OS they're running? Or which version of Office they have? There may be different commands associated, if they are running different stuff than you developed for.

Good luck
Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top