Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.pagelayout
Senthil Senthil is offline
external usenet poster
 
Posts: 11
Default Print Frist 2 pages in First Page Tray & others in other pages tra

I use one tray for Headed Paper and another for plain paper.
Using macro i print first page of the document to the headed paper and
remaining pages in plain paper tray correctly.

Now to be more eco-freindly, to avoid wastage of papers, i need to print the
second page of the document to the headed paper back side.

So ideally i need to Print Frist Two pages in First Page Tray & reamining
pages in other pages tray (which is already duplexed).

Need to if this is possible.

Code
--declare
Dim sPrinterName$
Dim sPortName$
Dim nFirstPageTray
Dim nOtherPagesTray

-- assignment
sPrinterName$ = 'assign print name
sPortName$ = 'assign port name
nFirstPageTray = ' assign "First Page Tray"
nOtherPagesTray = ' assign "Other Pages Tray"

--Set print details
WordBasic.FilePrintSetup Printer:=sPrinterName$ + " on " + sPortName$,
DoNotSetAsSysDefault:=1

--Set the trays
WordBasic.FilePageSetup applypropsto:=4, FirstPage:=nFirstPageTray,
OtherPages:=nOtherPagesTray

--Print the ducment
WordBasic.FilePrint Background:=1

Thanks
Senthil
  #2   Report Post  
Posted to microsoft.public.word.pagelayout
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Print Frist 2 pages in First Page Tray & others in other pages tra

Instead of setting different first page - print the first two pages to tray1
and the rest to tray2. If the whole is duplexed it should work. For macro
code to switch trays see http://www.gmayor.com/fax_from_word.htm

I believe all trees used for paper are from sustainable forests planted for
the purpose of creating paper and as more trees should be better, it could
be argued that by not using paper you are adding to the reduction in tree
numbers planted - albeit in a tiny way

You would also be helping reduce available jobs.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
I use one tray for Headed Paper and another for plain paper.
Using macro i print first page of the document to the headed paper and
remaining pages in plain paper tray correctly.

Now to be more eco-freindly, to avoid wastage of papers, i need to print
the
second page of the document to the headed paper back side.

So ideally i need to Print Frist Two pages in First Page Tray & reamining
pages in other pages tray (which is already duplexed).

Need to if this is possible.

Code
--declare
Dim sPrinterName$
Dim sPortName$
Dim nFirstPageTray
Dim nOtherPagesTray

-- assignment
sPrinterName$ = 'assign print name
sPortName$ = 'assign port name
nFirstPageTray = ' assign "First Page Tray"
nOtherPagesTray = ' assign "Other Pages Tray"

--Set print details
WordBasic.FilePrintSetup Printer:=sPrinterName$ + " on " + sPortName$,
DoNotSetAsSysDefault:=1

--Set the trays
WordBasic.FilePageSetup applypropsto:=4, FirstPage:=nFirstPageTray,
OtherPages:=nOtherPagesTray

--Print the ducment
WordBasic.FilePrint Background:=1

Thanks
Senthil



  #3   Report Post  
Posted to microsoft.public.word.pagelayout
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Print Frist 2 pages in First Page Tray & others in other pages tra

Instead of setting different first page - print the first two pages to tray1
and the rest to tray2. If the whole is duplexed it should work. For macro
code to switch trays see http://www.gmayor.com/fax_from_word.htm

I believe all trees used for paper are from sustainable forests planted for
the purpose of creating paper and as more trees should be better, it could
be argued that by not using paper you are adding to the reduction in tree
numbers planted - albeit in a tiny way

You would also be helping reduce available jobs.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
I use one tray for Headed Paper and another for plain paper.
Using macro i print first page of the document to the headed paper and
remaining pages in plain paper tray correctly.

Now to be more eco-freindly, to avoid wastage of papers, i need to print
the
second page of the document to the headed paper back side.

So ideally i need to Print Frist Two pages in First Page Tray & reamining
pages in other pages tray (which is already duplexed).

Need to if this is possible.

Code
--declare
Dim sPrinterName$
Dim sPortName$
Dim nFirstPageTray
Dim nOtherPagesTray

-- assignment
sPrinterName$ = 'assign print name
sPortName$ = 'assign port name
nFirstPageTray = ' assign "First Page Tray"
nOtherPagesTray = ' assign "Other Pages Tray"

--Set print details
WordBasic.FilePrintSetup Printer:=sPrinterName$ + " on " + sPortName$,
DoNotSetAsSysDefault:=1

--Set the trays
WordBasic.FilePageSetup applypropsto:=4, FirstPage:=nFirstPageTray,
OtherPages:=nOtherPagesTray

--Print the ducment
WordBasic.FilePrint Background:=1

Thanks
Senthil



  #4   Report Post  
Posted to microsoft.public.word.pagelayout
Senthil Senthil is offline
external usenet poster
 
Posts: 11
Default Print Frist 2 pages in First Page Tray & others in other pages

So is it not possible if we have set First Page tray and other pages tray?
Can we not tweak to print first two pages in First Page tray?

Meanwhile i will go through the link you posted.

And regarding the reducing papers its client who insisted upon this :-)

Thanks
Senthil
"Graham Mayor" wrote:

Instead of setting different first page - print the first two pages to tray1
and the rest to tray2. If the whole is duplexed it should work. For macro
code to switch trays see http://www.gmayor.com/fax_from_word.htm

I believe all trees used for paper are from sustainable forests planted for
the purpose of creating paper and as more trees should be better, it could
be argued that by not using paper you are adding to the reduction in tree
numbers planted - albeit in a tiny way

You would also be helping reduce available jobs.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
I use one tray for Headed Paper and another for plain paper.
Using macro i print first page of the document to the headed paper and
remaining pages in plain paper tray correctly.

Now to be more eco-freindly, to avoid wastage of papers, i need to print
the
second page of the document to the headed paper back side.

So ideally i need to Print Frist Two pages in First Page Tray & reamining
pages in other pages tray (which is already duplexed).

Need to if this is possible.

Code
--declare
Dim sPrinterName$
Dim sPortName$
Dim nFirstPageTray
Dim nOtherPagesTray

-- assignment
sPrinterName$ = 'assign print name
sPortName$ = 'assign port name
nFirstPageTray = ' assign "First Page Tray"
nOtherPagesTray = ' assign "Other Pages Tray"

--Set print details
WordBasic.FilePrintSetup Printer:=sPrinterName$ + " on " + sPortName$,
DoNotSetAsSysDefault:=1

--Set the trays
WordBasic.FilePageSetup applypropsto:=4, FirstPage:=nFirstPageTray,
OtherPages:=nOtherPagesTray

--Print the ducment
WordBasic.FilePrint Background:=1

Thanks
Senthil



.

  #5   Report Post  
Posted to microsoft.public.word.pagelayout
Senthil Senthil is offline
external usenet poster
 
Posts: 11
Default Print Frist 2 pages in First Page Tray & others in other pages


So is it not possible if we have set First Page tray and other pages tray?
Can we not tweak to print first two pages in First Page tray?

Meanwhile i will go through the link you posted.

And regarding the reducing papers its client who insisted upon this :-)

Thanks
Senthil
"Graham Mayor" wrote:

Instead of setting different first page - print the first two pages to tray1
and the rest to tray2. If the whole is duplexed it should work. For macro
code to switch trays see http://www.gmayor.com/fax_from_word.htm

I believe all trees used for paper are from sustainable forests planted for
the purpose of creating paper and as more trees should be better, it could
be argued that by not using paper you are adding to the reduction in tree
numbers planted - albeit in a tiny way

You would also be helping reduce available jobs.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
I use one tray for Headed Paper and another for plain paper.
Using macro i print first page of the document to the headed paper and
remaining pages in plain paper tray correctly.

Now to be more eco-freindly, to avoid wastage of papers, i need to print
the
second page of the document to the headed paper back side.

So ideally i need to Print Frist Two pages in First Page Tray & reamining
pages in other pages tray (which is already duplexed).

Need to if this is possible.

Code
--declare
Dim sPrinterName$
Dim sPortName$
Dim nFirstPageTray
Dim nOtherPagesTray

-- assignment
sPrinterName$ = 'assign print name
sPortName$ = 'assign port name
nFirstPageTray = ' assign "First Page Tray"
nOtherPagesTray = ' assign "Other Pages Tray"

--Set print details
WordBasic.FilePrintSetup Printer:=sPrinterName$ + " on " + sPortName$,
DoNotSetAsSysDefault:=1

--Set the trays
WordBasic.FilePageSetup applypropsto:=4, FirstPage:=nFirstPageTray,
OtherPages:=nOtherPagesTray

--Print the ducment
WordBasic.FilePrint Background:=1

Thanks
Senthil



.



  #6   Report Post  
Posted to microsoft.public.word.pagelayout
Senthil Senthil is offline
external usenet poster
 
Posts: 11
Default Print Frist 2 pages in First Page Tray & others in other pages

I couldn't find any specific code which says to print two pages in tray1 and
rest to tray2 in the given link.

OR

Do you mean to say that if First page tray is set to Tray1 and other pages
Tray to Tray2 and if the whole printer is duplexed (tray1 and tray2), the
output will be two pages in first tray and remaining pages to Tray 2.


"Graham Mayor" wrote:

Instead of setting different first page - print the first two pages to tray1
and the rest to tray2. If the whole is duplexed it should work. For macro
code to switch trays see http://www.gmayor.com/fax_from_word.htm

I believe all trees used for paper are from sustainable forests planted for
the purpose of creating paper and as more trees should be better, it could
be argued that by not using paper you are adding to the reduction in tree
numbers planted - albeit in a tiny way

You would also be helping reduce available jobs.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
I use one tray for Headed Paper and another for plain paper.
Using macro i print first page of the document to the headed paper and
remaining pages in plain paper tray correctly.

Now to be more eco-freindly, to avoid wastage of papers, i need to print
the
second page of the document to the headed paper back side.

So ideally i need to Print Frist Two pages in First Page Tray & reamining
pages in other pages tray (which is already duplexed).

Need to if this is possible.

Code
--declare
Dim sPrinterName$
Dim sPortName$
Dim nFirstPageTray
Dim nOtherPagesTray

-- assignment
sPrinterName$ = 'assign print name
sPortName$ = 'assign port name
nFirstPageTray = ' assign "First Page Tray"
nOtherPagesTray = ' assign "Other Pages Tray"

--Set print details
WordBasic.FilePrintSetup Printer:=sPrinterName$ + " on " + sPortName$,
DoNotSetAsSysDefault:=1

--Set the trays
WordBasic.FilePageSetup applypropsto:=4, FirstPage:=nFirstPageTray,
OtherPages:=nOtherPagesTray

--Print the ducment
WordBasic.FilePrint Background:=1

Thanks
Senthil



.

  #7   Report Post  
Posted to microsoft.public.word.pagelayout
Senthil Senthil is offline
external usenet poster
 
Posts: 11
Default Print Frist 2 pages in First Page Tray & others in other pages


I couldn't find any specific code which says to print two pages in tray1 and
rest to tray2 in the given link.

OR

Do you mean to say that if First page tray is set to Tray1 and other pages
Tray to Tray2 and if the whole printer is duplexed (tray1 and tray2), the
output will be two pages in first tray and remaining pages to Tray 2.


"Graham Mayor" wrote:

Instead of setting different first page - print the first two pages to tray1
and the rest to tray2. If the whole is duplexed it should work. For macro
code to switch trays see http://www.gmayor.com/fax_from_word.htm

I believe all trees used for paper are from sustainable forests planted for
the purpose of creating paper and as more trees should be better, it could
be argued that by not using paper you are adding to the reduction in tree
numbers planted - albeit in a tiny way

You would also be helping reduce available jobs.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
I use one tray for Headed Paper and another for plain paper.
Using macro i print first page of the document to the headed paper and
remaining pages in plain paper tray correctly.

Now to be more eco-freindly, to avoid wastage of papers, i need to print
the
second page of the document to the headed paper back side.

So ideally i need to Print Frist Two pages in First Page Tray & reamining
pages in other pages tray (which is already duplexed).

Need to if this is possible.

Code
--declare
Dim sPrinterName$
Dim sPortName$
Dim nFirstPageTray
Dim nOtherPagesTray

-- assignment
sPrinterName$ = 'assign print name
sPortName$ = 'assign port name
nFirstPageTray = ' assign "First Page Tray"
nOtherPagesTray = ' assign "Other Pages Tray"

--Set print details
WordBasic.FilePrintSetup Printer:=sPrinterName$ + " on " + sPortName$,
DoNotSetAsSysDefault:=1

--Set the trays
WordBasic.FilePageSetup applypropsto:=4, FirstPage:=nFirstPageTray,
OtherPages:=nOtherPagesTray

--Print the ducment
WordBasic.FilePrint Background:=1

Thanks
Senthil



.

  #8   Report Post  
Posted to microsoft.public.word.pagelayout
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Print Frist 2 pages in First Page Tray & others in other pages

Referring to the aforementioned web page - you would probably need to modify
the macro along the lines of

Sub FilePrint()
Dim sCurrentPrinter As String '*
Dim sTray As Integer
sCurrentPrinter = ActivePrinter '*
sTray = Options.DefaultTrayID
ActivePrinter = "HP LaserJet 4050 Series PS" '*
With Options
.DefaultTrayID = 260
End With
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="1,2"
With Options
.DefaultTrayID = sTray
End With
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="3-99"
ActivePrinter = sCurrentPrinter '*
End Sub

The lines marked '* could be removed if the user is always using the same
printer (though check the tray assigments as shown)
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
So is it not possible if we have set First Page tray and other pages tray?
Can we not tweak to print first two pages in First Page tray?

Meanwhile i will go through the link you posted.

And regarding the reducing papers its client who insisted upon this :-)

Thanks
Senthil
"Graham Mayor" wrote:

Instead of setting different first page - print the first two pages to
tray1
and the rest to tray2. If the whole is duplexed it should work. For macro
code to switch trays see http://www.gmayor.com/fax_from_word.htm

I believe all trees used for paper are from sustainable forests planted
for
the purpose of creating paper and as more trees should be better, it
could
be argued that by not using paper you are adding to the reduction in tree
numbers planted - albeit in a tiny way

You would also be helping reduce available jobs.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
I use one tray for Headed Paper and another for plain paper.
Using macro i print first page of the document to the headed paper and
remaining pages in plain paper tray correctly.

Now to be more eco-freindly, to avoid wastage of papers, i need to
print
the
second page of the document to the headed paper back side.

So ideally i need to Print Frist Two pages in First Page Tray &
reamining
pages in other pages tray (which is already duplexed).

Need to if this is possible.

Code
--declare
Dim sPrinterName$
Dim sPortName$
Dim nFirstPageTray
Dim nOtherPagesTray

-- assignment
sPrinterName$ = 'assign print name
sPortName$ = 'assign port name
nFirstPageTray = ' assign "First Page Tray"
nOtherPagesTray = ' assign "Other Pages Tray"

--Set print details
WordBasic.FilePrintSetup Printer:=sPrinterName$ + " on " + sPortName$,
DoNotSetAsSysDefault:=1

--Set the trays
WordBasic.FilePageSetup applypropsto:=4, FirstPage:=nFirstPageTray,
OtherPages:=nOtherPagesTray

--Print the ducment
WordBasic.FilePrint Background:=1

Thanks
Senthil



.



  #9   Report Post  
Posted to microsoft.public.word.pagelayout
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Print Frist 2 pages in First Page Tray & others in other pages


Referring to the aforementioned web page - you would probably need to modify
the macro along the lines of

Sub FilePrint()
Dim sCurrentPrinter As String '*
Dim sTray As Integer
sCurrentPrinter = ActivePrinter '*
sTray = Options.DefaultTrayID
ActivePrinter = "HP LaserJet 4050 Series PS" '*
With Options
.DefaultTrayID = 260
End With
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="1,2"
With Options
.DefaultTrayID = sTray
End With
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="3-99"
ActivePrinter = sCurrentPrinter '*
End Sub

The lines marked '* could be removed if the user is always using the same
printer (though check the tray assigments as shown)
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
So is it not possible if we have set First Page tray and other pages tray?
Can we not tweak to print first two pages in First Page tray?

Meanwhile i will go through the link you posted.

And regarding the reducing papers its client who insisted upon this :-)

Thanks
Senthil
"Graham Mayor" wrote:

Instead of setting different first page - print the first two pages to
tray1
and the rest to tray2. If the whole is duplexed it should work. For macro
code to switch trays see http://www.gmayor.com/fax_from_word.htm

I believe all trees used for paper are from sustainable forests planted
for
the purpose of creating paper and as more trees should be better, it
could
be argued that by not using paper you are adding to the reduction in tree
numbers planted - albeit in a tiny way

You would also be helping reduce available jobs.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
I use one tray for Headed Paper and another for plain paper.
Using macro i print first page of the document to the headed paper and
remaining pages in plain paper tray correctly.

Now to be more eco-freindly, to avoid wastage of papers, i need to
print
the
second page of the document to the headed paper back side.

So ideally i need to Print Frist Two pages in First Page Tray &
reamining
pages in other pages tray (which is already duplexed).

Need to if this is possible.

Code
--declare
Dim sPrinterName$
Dim sPortName$
Dim nFirstPageTray
Dim nOtherPagesTray

-- assignment
sPrinterName$ = 'assign print name
sPortName$ = 'assign port name
nFirstPageTray = ' assign "First Page Tray"
nOtherPagesTray = ' assign "Other Pages Tray"

--Set print details
WordBasic.FilePrintSetup Printer:=sPrinterName$ + " on " + sPortName$,
DoNotSetAsSysDefault:=1

--Set the trays
WordBasic.FilePageSetup applypropsto:=4, FirstPage:=nFirstPageTray,
OtherPages:=nOtherPagesTray

--Print the ducment
WordBasic.FilePrint Background:=1

Thanks
Senthil



.



  #10   Report Post  
Posted to microsoft.public.word.pagelayout
Senthil Senthil is offline
external usenet poster
 
Posts: 11
Default Print Frist 2 pages in First Page Tray & others in other pages

Thanks Graham, this seems to be working expect i modified printing for rest
of pages like below, hope this is right.

sRestPages = "3-" & ActiveDocument.ActiveWindow.Panes(1).Pages.Count

Options.DefaultTrayID = nOtherPagesTray
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages,
Item:=wdPrintDocumentContent, Copies:=1, Pages:=sRestPages

Cheers
Senthil

ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="3-99"




"Graham Mayor" wrote:

Referring to the aforementioned web page - you would probably need to modify
the macro along the lines of

Sub FilePrint()
Dim sCurrentPrinter As String '*
Dim sTray As Integer
sCurrentPrinter = ActivePrinter '*
sTray = Options.DefaultTrayID
ActivePrinter = "HP LaserJet 4050 Series PS" '*
With Options
.DefaultTrayID = 260
End With
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="1,2"
With Options
.DefaultTrayID = sTray
End With
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="3-99"
ActivePrinter = sCurrentPrinter '*
End Sub

The lines marked '* could be removed if the user is always using the same
printer (though check the tray assigments as shown)
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
So is it not possible if we have set First Page tray and other pages tray?
Can we not tweak to print first two pages in First Page tray?

Meanwhile i will go through the link you posted.

And regarding the reducing papers its client who insisted upon this :-)

Thanks
Senthil
"Graham Mayor" wrote:

Instead of setting different first page - print the first two pages to
tray1
and the rest to tray2. If the whole is duplexed it should work. For macro
code to switch trays see http://www.gmayor.com/fax_from_word.htm

I believe all trees used for paper are from sustainable forests planted
for
the purpose of creating paper and as more trees should be better, it
could
be argued that by not using paper you are adding to the reduction in tree
numbers planted - albeit in a tiny way

You would also be helping reduce available jobs.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
I use one tray for Headed Paper and another for plain paper.
Using macro i print first page of the document to the headed paper and
remaining pages in plain paper tray correctly.

Now to be more eco-freindly, to avoid wastage of papers, i need to
print
the
second page of the document to the headed paper back side.

So ideally i need to Print Frist Two pages in First Page Tray &
reamining
pages in other pages tray (which is already duplexed).

Need to if this is possible.

Code
--declare
Dim sPrinterName$
Dim sPortName$
Dim nFirstPageTray
Dim nOtherPagesTray

-- assignment
sPrinterName$ = 'assign print name
sPortName$ = 'assign port name
nFirstPageTray = ' assign "First Page Tray"
nOtherPagesTray = ' assign "Other Pages Tray"

--Set print details
WordBasic.FilePrintSetup Printer:=sPrinterName$ + " on " + sPortName$,
DoNotSetAsSysDefault:=1

--Set the trays
WordBasic.FilePageSetup applypropsto:=4, FirstPage:=nFirstPageTray,
OtherPages:=nOtherPagesTray

--Print the ducment
WordBasic.FilePrint Background:=1

Thanks
Senthil


.



.



  #11   Report Post  
Posted to microsoft.public.word.pagelayout
Senthil Senthil is offline
external usenet poster
 
Posts: 11
Default Print Frist 2 pages in First Page Tray & others in other pages

Thanks Graham, this seems to be working expect i modified printing for rest
of pages like below, hope this is right.

sRestPages = "3-" & ActiveDocument.ActiveWindow.Panes(1).Pages.Count

Options.DefaultTrayID = nOtherPagesTray
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages,
Item:=wdPrintDocumentContent, Copies:=1, Pages:=sRestPages

Cheers
Senthil

ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="3-99"




"Graham Mayor" wrote:

Referring to the aforementioned web page - you would probably need to modify
the macro along the lines of

Sub FilePrint()
Dim sCurrentPrinter As String '*
Dim sTray As Integer
sCurrentPrinter = ActivePrinter '*
sTray = Options.DefaultTrayID
ActivePrinter = "HP LaserJet 4050 Series PS" '*
With Options
.DefaultTrayID = 260
End With
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="1,2"
With Options
.DefaultTrayID = sTray
End With
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="3-99"
ActivePrinter = sCurrentPrinter '*
End Sub

The lines marked '* could be removed if the user is always using the same
printer (though check the tray assigments as shown)
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
So is it not possible if we have set First Page tray and other pages tray?
Can we not tweak to print first two pages in First Page tray?

Meanwhile i will go through the link you posted.

And regarding the reducing papers its client who insisted upon this :-)

Thanks
Senthil
"Graham Mayor" wrote:

Instead of setting different first page - print the first two pages to
tray1
and the rest to tray2. If the whole is duplexed it should work. For macro
code to switch trays see http://www.gmayor.com/fax_from_word.htm

I believe all trees used for paper are from sustainable forests planted
for
the purpose of creating paper and as more trees should be better, it
could
be argued that by not using paper you are adding to the reduction in tree
numbers planted - albeit in a tiny way

You would also be helping reduce available jobs.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
I use one tray for Headed Paper and another for plain paper.
Using macro i print first page of the document to the headed paper and
remaining pages in plain paper tray correctly.

Now to be more eco-freindly, to avoid wastage of papers, i need to
print
the
second page of the document to the headed paper back side.

So ideally i need to Print Frist Two pages in First Page Tray &
reamining
pages in other pages tray (which is already duplexed).

Need to if this is possible.

Code
--declare
Dim sPrinterName$
Dim sPortName$
Dim nFirstPageTray
Dim nOtherPagesTray

-- assignment
sPrinterName$ = 'assign print name
sPortName$ = 'assign port name
nFirstPageTray = ' assign "First Page Tray"
nOtherPagesTray = ' assign "Other Pages Tray"

--Set print details
WordBasic.FilePrintSetup Printer:=sPrinterName$ + " on " + sPortName$,
DoNotSetAsSysDefault:=1

--Set the trays
WordBasic.FilePageSetup applypropsto:=4, FirstPage:=nFirstPageTray,
OtherPages:=nOtherPagesTray

--Print the ducment
WordBasic.FilePrint Background:=1

Thanks
Senthil


.



.

  #12   Report Post  
Posted to microsoft.public.word.pagelayout
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Print Frist 2 pages in First Page Tray & others in other pages

That will work - did you add
Dim sRestPages as String
at the start? You should declare all your variables.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Senthil" wrote in message
...
Thanks Graham, this seems to be working expect i modified printing for
rest
of pages like below, hope this is right.

sRestPages = "3-" & ActiveDocument.ActiveWindow.Panes(1).Pages.Count

Options.DefaultTrayID = nOtherPagesTray
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages,
Item:=wdPrintDocumentContent, Copies:=1, Pages:=sRestPages

Cheers
Senthil

ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="3-99"




"Graham Mayor" wrote:

Referring to the aforementioned web page - you would probably need to
modify
the macro along the lines of

Sub FilePrint()
Dim sCurrentPrinter As String '*
Dim sTray As Integer
sCurrentPrinter = ActivePrinter '*
sTray = Options.DefaultTrayID
ActivePrinter = "HP LaserJet 4050 Series PS" '*
With Options
.DefaultTrayID = 260
End With
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="1,2"
With Options
.DefaultTrayID = sTray
End With
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="3-99"
ActivePrinter = sCurrentPrinter '*
End Sub

The lines marked '* could be removed if the user is always using the same
printer (though check the tray assigments as shown)
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
So is it not possible if we have set First Page tray and other pages
tray?
Can we not tweak to print first two pages in First Page tray?

Meanwhile i will go through the link you posted.

And regarding the reducing papers its client who insisted upon this :-)

Thanks
Senthil
"Graham Mayor" wrote:

Instead of setting different first page - print the first two pages to
tray1
and the rest to tray2. If the whole is duplexed it should work. For
macro
code to switch trays see http://www.gmayor.com/fax_from_word.htm

I believe all trees used for paper are from sustainable forests
planted
for
the purpose of creating paper and as more trees should be better, it
could
be argued that by not using paper you are adding to the reduction in
tree
numbers planted - albeit in a tiny way

You would also be helping reduce available jobs.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
I use one tray for Headed Paper and another for plain paper.
Using macro i print first page of the document to the headed paper
and
remaining pages in plain paper tray correctly.

Now to be more eco-freindly, to avoid wastage of papers, i need to
print
the
second page of the document to the headed paper back side.

So ideally i need to Print Frist Two pages in First Page Tray &
reamining
pages in other pages tray (which is already duplexed).

Need to if this is possible.

Code
--declare
Dim sPrinterName$
Dim sPortName$
Dim nFirstPageTray
Dim nOtherPagesTray

-- assignment
sPrinterName$ = 'assign print name
sPortName$ = 'assign port name
nFirstPageTray = ' assign "First Page Tray"
nOtherPagesTray = ' assign "Other Pages Tray"

--Set print details
WordBasic.FilePrintSetup Printer:=sPrinterName$ + " on " +
sPortName$,
DoNotSetAsSysDefault:=1

--Set the trays
WordBasic.FilePageSetup applypropsto:=4, FirstPage:=nFirstPageTray,
OtherPages:=nOtherPagesTray

--Print the ducment
WordBasic.FilePrint Background:=1

Thanks
Senthil


.



.



  #13   Report Post  
Posted to microsoft.public.word.pagelayout
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Print Frist 2 pages in First Page Tray & others in other pages


That will work - did you add
Dim sRestPages as String
at the start? You should declare all your variables.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Senthil" wrote in message
...
Thanks Graham, this seems to be working expect i modified printing for
rest
of pages like below, hope this is right.

sRestPages = "3-" & ActiveDocument.ActiveWindow.Panes(1).Pages.Count

Options.DefaultTrayID = nOtherPagesTray
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages,
Item:=wdPrintDocumentContent, Copies:=1, Pages:=sRestPages

Cheers
Senthil

ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="3-99"




"Graham Mayor" wrote:

Referring to the aforementioned web page - you would probably need to
modify
the macro along the lines of

Sub FilePrint()
Dim sCurrentPrinter As String '*
Dim sTray As Integer
sCurrentPrinter = ActivePrinter '*
sTray = Options.DefaultTrayID
ActivePrinter = "HP LaserJet 4050 Series PS" '*
With Options
.DefaultTrayID = 260
End With
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="1,2"
With Options
.DefaultTrayID = sTray
End With
ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="3-99"
ActivePrinter = sCurrentPrinter '*
End Sub

The lines marked '* could be removed if the user is always using the same
printer (though check the tray assigments as shown)
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
So is it not possible if we have set First Page tray and other pages
tray?
Can we not tweak to print first two pages in First Page tray?

Meanwhile i will go through the link you posted.

And regarding the reducing papers its client who insisted upon this :-)

Thanks
Senthil
"Graham Mayor" wrote:

Instead of setting different first page - print the first two pages to
tray1
and the rest to tray2. If the whole is duplexed it should work. For
macro
code to switch trays see http://www.gmayor.com/fax_from_word.htm

I believe all trees used for paper are from sustainable forests
planted
for
the purpose of creating paper and as more trees should be better, it
could
be argued that by not using paper you are adding to the reduction in
tree
numbers planted - albeit in a tiny way

You would also be helping reduce available jobs.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Senthil" wrote in message
...
I use one tray for Headed Paper and another for plain paper.
Using macro i print first page of the document to the headed paper
and
remaining pages in plain paper tray correctly.

Now to be more eco-freindly, to avoid wastage of papers, i need to
print
the
second page of the document to the headed paper back side.

So ideally i need to Print Frist Two pages in First Page Tray &
reamining
pages in other pages tray (which is already duplexed).

Need to if this is possible.

Code
--declare
Dim sPrinterName$
Dim sPortName$
Dim nFirstPageTray
Dim nOtherPagesTray

-- assignment
sPrinterName$ = 'assign print name
sPortName$ = 'assign port name
nFirstPageTray = ' assign "First Page Tray"
nOtherPagesTray = ' assign "Other Pages Tray"

--Set print details
WordBasic.FilePrintSetup Printer:=sPrinterName$ + " on " +
sPortName$,
DoNotSetAsSysDefault:=1

--Set the trays
WordBasic.FilePageSetup applypropsto:=4, FirstPage:=nFirstPageTray,
OtherPages:=nOtherPagesTray

--Print the ducment
WordBasic.FilePrint Background:=1

Thanks
Senthil


.



.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
First page prints from tray 2, remaining pages from tray 1 Jeremy Frank Microsoft Word Help 1 December 3rd 08 10:41 PM
How to print pages 1 and 4 on one page and pages 2 and 3 on the ba mdinning Page Layout 1 November 10th 07 04:05 PM
how to delete some pages entirely but not change anything of other pages'(including page header and page footer)? Zhukf Page Layout 1 March 9th 07 01:05 PM
how to delete some pages but not change anything of other pages'(including page header and page footer)? Zhukf Page Layout 1 March 6th 07 03:09 AM
how do i print multiple pages without a line separating pages in W donna98 Microsoft Word Help 1 May 28th 05 05:25 AM


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

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"