PC Review


Reply
Thread Tools Rate Thread

ActiveWindow.SelectedSheets.PrintOut ?

 
 
James Cornthwaite
Guest
Posts: n/a
 
      12th Nov 2006
Hi,

Does anybody know how "ActiveWindow.SelectedSheets.PrintOut" can changed to
make all selected worksheets be sent to the printer as one job rather than
several jobs ?

The rationale being its used in a macro where all pages must be printed
together without the risk of other peoples (printer on busy network) jobs
being placed in between or is it not possible?

Many thanks
James




 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      12th Nov 2006
Try:
Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
before your PrintOut command
--
Gary's Student


"James Cornthwaite" wrote:

> Hi,
>
> Does anybody know how "ActiveWindow.SelectedSheets.PrintOut" can changed to
> make all selected worksheets be sent to the printer as one job rather than
> several jobs ?
>
> The rationale being its used in a macro where all pages must be printed
> together without the risk of other peoples (printer on busy network) jobs
> being placed in between or is it not possible?
>
> Many thanks
> James
>
>
>
>
>

 
Reply With Quote
 
James Cornthwaite
Guest
Posts: n/a
 
      12th Nov 2006
That works great now. Thanks. but.... (sorry)

The last awkward point I want to achieve is to print only the FIRST page of
each worksheet (its complicated as to why).

Ideally something like

Sheets(Array("Sheet1".pageOneOnly, "Sheet2".pageOneOnly,
"Sheet3".pageOneOnly)).Select.
ActiveWindow.SelectedSheets.PrintOut

Is this possible ?



Obviously the following only prints the first page of the whole array rather
than the desired first page of each the selected sheets.
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1

I've worked out how to print the first page of each selected sheet but only
ever as seperate jobs being sent to the printer, never as just the one job.



Many many thanks
James

"Gary''s Student" <(E-Mail Removed)> wrote in message
news:7C5BDF45-949A-4584-ABF1-(E-Mail Removed)...
> Try:
> Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
> before your PrintOut command
> --
> Gary's Student
>
>
> "James Cornthwaite" wrote:
>
>> Hi,
>>
>> Does anybody know how "ActiveWindow.SelectedSheets.PrintOut" can changed
>> to
>> make all selected worksheets be sent to the printer as one job rather
>> than
>> several jobs ?
>>
>> The rationale being its used in a macro where all pages must be printed
>> together without the risk of other peoples (printer on busy network) jobs
>> being placed in between or is it not possible?
>>
>> Many thanks
>> James
>>
>>
>>
>>
>>



 
Reply With Quote
 
JMay
Guest
Posts: n/a
 
      12th Nov 2006
Try:
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate
_
:=True
hth

"James Cornthwaite" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed):

> That works great now. Thanks. but.... (sorry)
>
> The last awkward point I want to achieve is to print only the FIRST page of
> each worksheet (its complicated as to why).
>
> Ideally something like
>
> Sheets(Array("Sheet1".pageOneOnly, "Sheet2".pageOneOnly,
> "Sheet3".pageOneOnly)).Select.
> ActiveWindow.SelectedSheets.PrintOut
>
> Is this possible ?
>
>
>
> Obviously the following only prints the first page of the whole array rather
> than the desired first page of each the selected sheets.
> ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1
>
> I've worked out how to print the first page of each selected sheet but only
> ever as seperate jobs being sent to the printer, never as just the one job.
>
>
>
> Many many thanks
> James
>
> "Gary''s Student" <(E-Mail Removed)> wrote in message
> news:7C5BDF45-949A-4584-ABF1-(E-Mail Removed)...
> > Try:
> > Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
> > before your PrintOut command
> > --
> > Gary's Student
> >
> >
> > "James Cornthwaite" wrote:
> >
> >> Hi,
> >>
> >> Does anybody know how "ActiveWindow.SelectedSheets.PrintOut" can changed
> >> to
> >> make all selected worksheets be sent to the printer as one job rather
> >> than
> >> several jobs ?
> >>
> >> The rationale being its used in a macro where all pages must be printed
> >> together without the risk of other peoples (printer on busy network) jobs
> >> being placed in between or is it not possible?
> >>
> >> Many thanks
> >> James
> >>
> >>
> >>
> >>
> >>


 
Reply With Quote
 
James Cornthwaite
Guest
Posts: n/a
 
      12th Nov 2006
Thanks for the reply

Unfortunately that doesnt work (or do what i want)

It only prints the first page of the FIRST selected worksheet rather than
the desired first page of EACH selected worksheet
(politly remember I want to send to the printer as one job else it would be
easy i guess)

Thanks again
James





"JMay" <(E-Mail Removed)> wrote in message
news:zSG5h.33993$(E-Mail Removed)...
> Try:
> ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
> :=True
> hth
>
> "James Cornthwaite" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed):
>
>> That works great now. Thanks. but.... (sorry)
>>
>> The last awkward point I want to achieve is to print only the FIRST page
>> of
>> each worksheet (its complicated as to why).
>>
>> Ideally something like
>>
>> Sheets(Array("Sheet1".pageOneOnly, "Sheet2".pageOneOnly,
>> "Sheet3".pageOneOnly)).Select.
>> ActiveWindow.SelectedSheets.PrintOut
>>
>> Is this possible ?
>>
>>
>>
>> Obviously the following only prints the first page of the whole array
>> rather
>> than the desired first page of each the selected sheets.
>> ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1
>>
>> I've worked out how to print the first page of each selected sheet but
>> only
>> ever as seperate jobs being sent to the printer, never as just the one
>> job.
>>
>>
>>
>> Many many thanks
>> James
>>
>> "Gary''s Student" <(E-Mail Removed)> wrote in
>> message
>> news:7C5BDF45-949A-4584-ABF1-(E-Mail Removed)...
>> > Try:
>> > Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
>> > before your PrintOut command
>> > --
>> > Gary's Student
>> >
>> >
>> > "James Cornthwaite" wrote:
>> >
>> >> Hi,
>> >>
>> >> Does anybody know how "ActiveWindow.SelectedSheets.PrintOut" can
>> >> changed
>> >> to
>> >> make all selected worksheets be sent to the printer as one job rather
>> >> than
>> >> several jobs ?
>> >>
>> >> The rationale being its used in a macro where all pages must be
>> >> printed
>> >> together without the risk of other peoples (printer on busy network)
>> >> jobs
>> >> being placed in between or is it not possible?
>> >>
>> >> Many thanks
>> >> James
>> >>
>> >>
>> >>
>> >>
>> >>

>



 
Reply With Quote
 
JMay
Guest
Posts: n/a
 
      12th Nov 2006
This ActiveWindow.Selectedsheet approach (in my opinion) has
limitations.
Are the Sheets which you wish to print contiguous (left to right) in
your Window footer? If they are then maybe you could modify the
following, which at present Prints ALL worksheets in the Book. Modify
the For each to get the contigous sheets you want.

Sub Print_MySheetsPg1Only()
For i = 1 To Worksheets.Count
Worksheets(i).Activate
ActiveSheet.PrintOut From:=1, To:=1, Copies:=1, Collate:=True
Next i
End Sub

I'm a novice at all this, but maybe this will work (for you).
Another "James" here,,,


"James Cornthwaite" <(E-Mail Removed)> wrote in message
news:K6-(E-Mail Removed):

> Thanks for the reply
>
> Unfortunately that doesnt work (or do what i want)
>
> It only prints the first page of the FIRST selected worksheet rather than
> the desired first page of EACH selected worksheet
> (politly remember I want to send to the printer as one job else it would be
> easy i guess)
>
> Thanks again
> James
>
>
>
>
>
> "JMay" <(E-Mail Removed)> wrote in message
> news:zSG5h.33993$(E-Mail Removed)...
> > Try:
> > ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
> > :=True
> > hth
> >
> > "James Cornthwaite" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed):
> >
> >> That works great now. Thanks. but.... (sorry)
> >>
> >> The last awkward point I want to achieve is to print only the FIRST page
> >> of
> >> each worksheet (its complicated as to why).
> >>
> >> Ideally something like
> >>
> >> Sheets(Array("Sheet1".pageOneOnly, "Sheet2".pageOneOnly,
> >> "Sheet3".pageOneOnly)).Select.
> >> ActiveWindow.SelectedSheets.PrintOut
> >>
> >> Is this possible ?
> >>
> >>
> >>
> >> Obviously the following only prints the first page of the whole array
> >> rather
> >> than the desired first page of each the selected sheets.
> >> ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1
> >>
> >> I've worked out how to print the first page of each selected sheet but
> >> only
> >> ever as seperate jobs being sent to the printer, never as just the one
> >> job.
> >>
> >>
> >>
> >> Many many thanks
> >> James
> >>
> >> "Gary''s Student" <(E-Mail Removed)> wrote in
> >> message
> >> news:7C5BDF45-949A-4584-ABF1-(E-Mail Removed)...
> >> > Try:
> >> > Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
> >> > before your PrintOut command
> >> > --
> >> > Gary's Student
> >> >
> >> >
> >> > "James Cornthwaite" wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> Does anybody know how "ActiveWindow.SelectedSheets.PrintOut" can
> >> >> changed
> >> >> to
> >> >> make all selected worksheets be sent to the printer as one job rather
> >> >> than
> >> >> several jobs ?
> >> >>
> >> >> The rationale being its used in a macro where all pages must be
> >> >> printed
> >> >> together without the risk of other peoples (printer on busy network)
> >> >> jobs
> >> >> being placed in between or is it not possible?
> >> >>
> >> >> Many thanks
> >> >> James
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>

> >


 
Reply With Quote
 
James Cornthwaite
Guest
Posts: n/a
 
      12th Nov 2006
I'll give it a go and report back.

Thanks
James

"JMay" <(E-Mail Removed)> wrote in message
news:gyK5h.37308$(E-Mail Removed)...
> This ActiveWindow.Selectedsheet approach (in my opinion) has limitations.
> Are the Sheets which you wish to print contiguous (left to right) in your
> Window footer? If they are then maybe you could modify the following,
> which at present Prints ALL worksheets in the Book. Modify the For each to
> get the contigous sheets you want.
>
> Sub Print_MySheetsPg1Only()
> For i = 1 To Worksheets.Count
> Worksheets(i).Activate
> ActiveSheet.PrintOut From:=1, To:=1, Copies:=1, Collate:=True
> Next i
> End Sub
>
> I'm a novice at all this, but maybe this will work (for you).
> Another "James" here,,,
>
>
> "James Cornthwaite" <(E-Mail Removed)> wrote in message
> news:K6-(E-Mail Removed):
>
>> Thanks for the reply
>>
>> Unfortunately that doesnt work (or do what i want)
>>
>> It only prints the first page of the FIRST selected worksheet rather than
>> the desired first page of EACH selected worksheet
>> (politly remember I want to send to the printer as one job else it would
>> be
>> easy i guess)
>>
>> Thanks again
>> James
>>
>>
>>
>>
>>
>> "JMay" <(E-Mail Removed)> wrote in message
>> news:zSG5h.33993$(E-Mail Removed)...
>> > Try:
>> > ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate
>> > _
>> > :=True
>> > hth
>> >
>> > "James Cornthwaite" <(E-Mail Removed)> wrote in message
>> > news:(E-Mail Removed):
>> >
>> >> That works great now. Thanks. but.... (sorry)
>> >>
>> >> The last awkward point I want to achieve is to print only the FIRST
>> >> page
>> >> of
>> >> each worksheet (its complicated as to why).
>> >>
>> >> Ideally something like
>> >>
>> >> Sheets(Array("Sheet1".pageOneOnly, "Sheet2".pageOneOnly,
>> >> "Sheet3".pageOneOnly)).Select.
>> >> ActiveWindow.SelectedSheets.PrintOut
>> >>
>> >> Is this possible ?
>> >>
>> >>
>> >>
>> >> Obviously the following only prints the first page of the whole array
>> >> rather
>> >> than the desired first page of each the selected sheets.
>> >> ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1
>> >>
>> >> I've worked out how to print the first page of each selected sheet but
>> >> only
>> >> ever as seperate jobs being sent to the printer, never as just the one
>> >> job.
>> >>
>> >>
>> >>
>> >> Many many thanks
>> >> James
>> >>
>> >> "Gary''s Student" <(E-Mail Removed)> wrote in
>> >> message
>> >> news:7C5BDF45-949A-4584-ABF1-(E-Mail Removed)...
>> >> > Try:
>> >> > Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
>> >> > before your PrintOut command
>> >> > --
>> >> > Gary's Student
>> >> >
>> >> >
>> >> > "James Cornthwaite" wrote:
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> Does anybody know how "ActiveWindow.SelectedSheets.PrintOut" can
>> >> >> changed
>> >> >> to
>> >> >> make all selected worksheets be sent to the printer as one job
>> >> >> rather
>> >> >> than
>> >> >> several jobs ?
>> >> >>
>> >> >> The rationale being its used in a macro where all pages must be
>> >> >> printed
>> >> >> together without the risk of other peoples (printer on busy
>> >> >> network)
>> >> >> jobs
>> >> >> being placed in between or is it not possible?
>> >> >>
>> >> >> Many thanks
>> >> >> James
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveWindow.SelectedSheets.PrintOut - Print to single workbook KateB Microsoft Excel Programming 4 11th Dec 2008 12:40 AM
If SelectedSheets.Count > 1, ActiveSheet.Unprotect fails. =?Utf-8?B?YnRh?= Microsoft Excel Crashes 0 11th Jul 2007 05:04 PM
Excel.ActiveWindow Is Excel.ActiveWindow Returns False Neal Andrews Microsoft Excel Programming 1 26th Oct 2006 11:10 AM
ActiveWindow.SelectedSheets.PrintOut excel-lent Microsoft Excel Programming 4 15th Jun 2005 03:48 PM
ActiveWindow.SelectedSheets.PrintPreview =?Utf-8?B?SGVscE1l?= Microsoft Excel Programming 0 17th Nov 2004 03:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:06 PM.