Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Change Default Print Options On The Fly?

Hello, through code I have made Excel print a particular worksheet (defined
range)

Is there any way that I can make the windows printer dialogue box appear.
(I would like to select which printer it prints to each time)

I believe I could work out how to do this, given time.

However I would like to be able to specify that "2" appears in the number of
copies box.

(One copy for the customer to takeaway and a hard copy for my records)

TIA for any help! I'm in a bit of a pickle clicking the print button twice,
and then maybe a third time to just confirm. :-)


--
Dan Walters
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Change Default Print Options On The Fly?

Daniel,
This will show the print dialog:
Application.Dialogs(xlDialogPrint).Show

But then it is difficult to control the print dialog properties once it
shown.

Why not show a list of printers :
http://word.mvps.org/FAQS/MacrosVBA/...lePrinters.htm

Then use the selected printer in the .PrintOut method, setting the copies=2

NickHK

"DanielWalters6" wrote in message
...
Hello, through code I have made Excel print a particular worksheet

(defined
range)

Is there any way that I can make the windows printer dialogue box appear.
(I would like to select which printer it prints to each time)

I believe I could work out how to do this, given time.

However I would like to be able to specify that "2" appears in the number

of
copies box.

(One copy for the customer to takeaway and a hard copy for my records)

TIA for any help! I'm in a bit of a pickle clicking the print button

twice,
and then maybe a third time to just confirm. :-)


--
Dan Walters



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Change Default Print Options On The Fly?

Thaknyou for your help - I will let you know how I get on with this project!


--
Dan Walters


"NickHK" wrote:

Daniel,
This will show the print dialog:
Application.Dialogs(xlDialogPrint).Show

But then it is difficult to control the print dialog properties once it
shown.

Why not show a list of printers :
http://word.mvps.org/FAQS/MacrosVBA/...lePrinters.htm

Then use the selected printer in the .PrintOut method, setting the copies=2

NickHK

"DanielWalters6" wrote in message
...
Hello, through code I have made Excel print a particular worksheet

(defined
range)

Is there any way that I can make the windows printer dialogue box appear.
(I would like to select which printer it prints to each time)

I believe I could work out how to do this, given time.

However I would like to be able to specify that "2" appears in the number

of
copies box.

(One copy for the customer to takeaway and a hard copy for my records)

TIA for any help! I'm in a bit of a pickle clicking the print button

twice,
and then maybe a third time to just confirm. :-)


--
Dan Walters




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Change Default Print Options On The Fly?


"DanielWalters6" wrote in message
...
Hello, through code I have made Excel print a particular worksheet
(defined
range)

Is there any way that I can make the windows printer dialogue box appear.
(I would like to select which printer it prints to each time)

I believe I could work out how to do this, given time.

However I would like to be able to specify that "2" appears in the number
of
copies box.

(One copy for the customer to takeaway and a hard copy for my records)

TIA for any help! I'm in a bit of a pickle clicking the print button
twice,
and then maybe a third time to just confirm. :-)


--
Dan Walters


You can use

Application.Dialogs(xlDialogPrint).Show ,,,2

The commas are to indicate the required parameter position from the
following list

range_num, from, to, copies, draft, preview, print_what, color, feed,
quality, y_resolution, selection, printer_text, print_to_file, collate

So for 5 copies end with ,,,5

--
Chris Lewis


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Change Default Print Options On The Fly?

Chris,
Well, I leant something today.

What does "print_what" expect as a value ?

NickHK

"Chris Lewis" wrote in message
...

"DanielWalters6" wrote in

message
...
Hello, through code I have made Excel print a particular worksheet
(defined
range)

Is there any way that I can make the windows printer dialogue box

appear.
(I would like to select which printer it prints to each time)

I believe I could work out how to do this, given time.

However I would like to be able to specify that "2" appears in the

number
of
copies box.

(One copy for the customer to takeaway and a hard copy for my records)

TIA for any help! I'm in a bit of a pickle clicking the print button
twice,
and then maybe a third time to just confirm. :-)


--
Dan Walters


You can use

Application.Dialogs(xlDialogPrint).Show ,,,2

The commas are to indicate the required parameter position from the
following list

range_num, from, to, copies, draft, preview, print_what, color, feed,
quality, y_resolution, selection, printer_text, print_to_file, collate

So for 5 copies end with ,,,5

--
Chris Lewis






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Change Default Print Options On The Fly?

Thankyou, that's brilliant, does exactly what I want, and with your added bit
of info and the response from NickHK's further question, I've managed to
reuse the code in other places within my project. (I have also advised an
friend who was happy to find there was an easier way!)

Thankyou once again
--
Dan Walters


"Chris Lewis" wrote:


"DanielWalters6" wrote in message
...
Hello, through code I have made Excel print a particular worksheet
(defined
range)

Is there any way that I can make the windows printer dialogue box appear.
(I would like to select which printer it prints to each time)

I believe I could work out how to do this, given time.

However I would like to be able to specify that "2" appears in the number
of
copies box.

(One copy for the customer to takeaway and a hard copy for my records)

TIA for any help! I'm in a bit of a pickle clicking the print button
twice,
and then maybe a third time to just confirm. :-)


--
Dan Walters


You can use

Application.Dialogs(xlDialogPrint).Show ,,,2

The commas are to indicate the required parameter position from the
following list

range_num, from, to, copies, draft, preview, print_what, color, feed,
quality, y_resolution, selection, printer_text, print_to_file, collate

So for 5 copies end with ,,,5

--
Chris Lewis



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
Change default printing options to print only worksheet JudyK Excel Discussion (Misc queries) 4 May 10th 08 12:29 AM
Change Paste Options default Lionel Excel Discussion (Misc queries) 0 July 15th 07 02:36 PM
How do I adjust Default Print options...11x17 instead of 8.5x11 UMMM Excel Discussion (Misc queries) 3 April 24th 07 04:32 AM
Can I change the default paste options? Charlie B Excel Discussion (Misc queries) 1 February 5th 06 10:06 PM
How to set DEFAULT print options in Excel to print gridlines? LKR Excel Discussion (Misc queries) 1 September 23rd 05 06:16 PM


All times are GMT +1. The time now is 11:32 PM.

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"