LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default SetActivePrinter

Hi All,

I am trying to ensure that users use print to a pre-set printer (in the
registry) usng Excel. I get the printer name as follows:

CPrintDialog dlg(true);
if( dlg.DoModal() != IDOK)
return false;

CString sPrinter = dlg.GetDeviceName();
// sPrinter = "hp officejet g series"

I then write the string into the registry. THis all works fine.

In Excel I call

app.SetActivePrinter(m_sPrinter);

and I get an error because, using app.GetActivePrinter() returns
"hp officejet g series on Ne03:"

Can anyone tell me how I get the name show by GetActivePrinter()?

TIA
JohnTheOne
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"