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?
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?