Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Eje Eje is offline
external usenet poster
 
Posts: 2
Default Printer name from handle

I need the printer name to printout an Excel worksheet.

CommonDlg returns a handle to the chosen printer while
the printout command needs the printername. The "newer"
PrinterDlg may return the printername but instead needs a
handle to a window. What window is unclear. User32.dll
can return a window's handle but need a frameclass which
a can't find.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Printer name from handle

Perhaps you can use this. It will set the printer.

application.Dialogs(xlDialogPrinterSetup).Show

--
Regards,
Tom Ogilvy

"Eje" wrote in message
...
I need the printer name to printout an Excel worksheet.

CommonDlg returns a handle to the chosen printer while
the printout command needs the printername. The "newer"
PrinterDlg may return the printername but instead needs a
handle to a window. What window is unclear. User32.dll
can return a window's handle but need a frameclass which
a can't find.



  #3   Report Post  
Posted to microsoft.public.excel.programming
Eje Eje is offline
external usenet poster
 
Posts: 2
Default Printer name from handle

Many thanks, Tom. You gave me an accepable solution.
Eje

-----Original Message-----
Perhaps you can use this. It will set the printer.

application.Dialogs(xlDialogPrinterSetup).Show

--
Regards,
Tom Ogilvy

"Eje" wrote in

message
...
I need the printer name to printout an Excel worksheet.

CommonDlg returns a handle to the chosen printer while
the printout command needs the printername. The "newer"
PrinterDlg may return the printername but instead

needs a
handle to a window. What window is unclear. User32.dll
can return a window's handle but need a frameclass

which
a can't find.



.

Reply
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to handle something like this DK Excel Discussion (Misc queries) 0 May 19th 09 11:40 PM
what is "fill handle". i don't see any fill handle in my excel Neelakanta New Users to Excel 32 June 18th 08 12:48 PM
members on my network printer not able to print to default printer smeheut Excel Discussion (Misc queries) 0 June 18th 07 06:42 PM
Printer Multiple Worksheets with a particular Printer Setting PP[_2_] Excel Worksheet Functions 0 March 14th 07 02:02 PM
Fill handle turned into a move handle Northwoods Excel Discussion (Misc queries) 1 March 2nd 07 03:40 PM


All times are GMT +1. The time now is 07:05 AM.

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

About Us

"It's about Microsoft Excel"