Store printer name to variable

  • Thread starter Thread starter Jeff Barnes
  • Start date Start date
J

Jeff Barnes

Hi everybody,

I am using OLE to access Excel. What I need to do is open the Printer
Selection dialog and store the printer name to a variable.

I can open the dialog by using:
oExcel:Dialogs(8):Show()

if I try to use a variable to store this it just returns .F.
cPrinter := oExcel:Dialogs(8):Show() (Returns .F.)

Any Ideas?

TIA
Jeff
 
Nice,

No not VB, I'm using Clipper / Fivewin, but, if you can show me how to do it
in VB I think I can figure it out.

I have found a work-around for now...

First I use the oExcel:Dialogs(8):Show() to set the active printer then
I use c:Printer:oExcel:Get("ActivePrinter") to store the printer name to
cPrinter.
The only problem with this is that right after oExcel:Dialogs(8):Show() it
flashes the excel screen for a second (I have set oExcel:Visable:= .t.) but
it still flashes ... I think I can live with this.

Jeff
 
Opps, Should have been NICK not NICE :-) (although I'm sure Nick is Nice
lol)

Jeff
 
Another correction ... Visable is set to .f. not true. (I really shoud
re-read before I send ... Sorry about that)

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top