Choosing a printer for NotesUIDocument.print in Notes client 5 and 6

I have to save a PDF from the current NotesUIDocument. The method must work under 5.0, 6.0 and 6.5.I’m using a virtual printer, and I have to make Notes change the printer setting just before the call to the print() method.

This must work on Windows 9x, 2k, xp.

Resetting the printer to the previous one doesn’t matter, so as setting the default OS printer instead of the current one.

The problem

Using WSH I can set the printer, but Notes doesn’t recognize the change (all other applications seem to recognize it!).

Using a workaround, I can make it work under Notes 5 (using a delay time). This technique doesn’t work under Notes 6.

Anyone could help?

I have tryed many solutions in forum, but it doesn’t work !!!