>>There's no way, since the function always returns an empty string. The Common Dialog ActiveX control, however, can be used to do this.
>
>George:
>
>Perhaps you can give me some help with using the Common Dialog control to programaticlly change a feature?
>
>If I call the ShowPrinter() method, navigate through the control, and change a setting, I then see that change reflected in the properties of the print driver. How can I send those same keystrokes from a program?
>
>I've tried
>
KEYBOARD '{TAB}{ENTER}{TAB}{TAB}{TAB}'
>which places me in a check box for "Flip Pages Up" in my currently selected printer. I press Spacebar and watch the checkbox change.
>
>When I added the Spacebar and finishing Enters to the KEYBOARD string, nothing changed. I modified the KEYBOARD string to have {LEFTMOUSE}, but that didn't work either.
>
>I found a workaround for this, but it is very kludgy and has generated a different set of problems.
>
>Any and all help is gratefully appreciated.
>
Rich,
I'm not sure there is one. The control shows the current state of the printer and allows the user to make changes. From what I understand, you're trying to control the initial display. Is that correct?
George
Ubi caritas et amor, deus ibi est