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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printer Error

Status
Not open for further replies.

bbegley

Programmer
Apr 29, 2002
228
US
We have a program that uses olevariants to communicate with word. We have a large user group now that (don't ask me to explain it) is using windows xp and Word 95. We have this line of code in our print routine:

WordObj.FilePrintSetup(Printer := Printer.Printers
[Printer.PrinterIndex], DoNotSetAsSysDefault := 1);

This line assigns the printer for the word documents to the printer the user selected to print non-word documents that we create. This causes error 1120 when used with Word95 and Win2000 or Word95 and WinXP. In all other situations it's fine. If we comment it out, there is no error, but the user cannot select a printer for Word (our current best answer, sadly). When I look at the printer name like this:
Showmessage(Printer.Printers[Printer.PrinterIndex]);

The values for the same printer are different on XP and Win98.
The Win98 says something like:
HP Laserjet4 on \\state.c....
The WinXP does not contain the first part, it just says:
\\state.c.....

Anyone else seen this?
 
Using any version of MS-Office version before Office 2000 will only bring you a LOT of troubles getting and keeping it up and running. Just a friendly advice: push (hard, if you have to) them into Word 2000 and most of your troubles will vanish, like snow in the sun...s-)

HTH
TonHu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top