Günter
Wed Jan 28 06:05:30 CST 2004
Hi Peter,
I tried what you said and now I know which causes my problem. The program
wants to print the original document with the mailmerge-fields which in fact
consists of one page only and not the merged document, which has many pages.
I don't know why, but even the command
objWord.Documents(1).PrintOut False, Range:=wdPrintFromTo, From:="2",
To:="2"
does not do the job. I'm lost somehow, as I don't know what causes Word to
print the original document every time.
Thanks again
Günter
--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
"Peter Hewett" <Nospam@xtra.co.nz> a écrit dans le message de
news:Xns947EDDAEFCF59Iwlpth@207.46.248.16...
> Hi Gunther
>
> Add a break point to your code at the line you execute your
> "objWord.ActiveDocument.PrintOut" statement.
>
> Try statements like, from the VB/VBA IDE Immediate window:
> objWord.ActiveDocument.PrintOut False, Range:=wdPrintFromTo, From:=1,
To:=1
>
> The above disables background printing for the documentand prints just
page
> 1. Try a few other variants and see what happens.
>
> HTH + Cheers - Peter
>
>
> "Günter Brandstätter" <me@ho.me> wrote in news:#ivghiX5DHA.1968
> @TK2MSFTNGP11.phx.gbl:
>
> > From: "G?nter Brandst"tter" <me@ho.me>
> > Subject: Re: Printout problem
> > Newsgroups: microsoft.public.word.vba.general
> >
> > Hi Peter,
> > I tried that also, if I look in the print queue, I see the document for
a
> > short time, but with a size of 400 bytes only, and it disappears. So
> > something must be wrong with the statement.
> > thanks for your answer anyway
> > G?nter
> >
> >
> >
> > --
> >
> >
>
> -------------------------------------------------------------------------
> > FIGHT BACK AGAINST SPAM!
> > Download Spam Inspector, the Award Winning Anti-Spam Filter
> >
http://mail.giantcompany.com
> >
> >
> > "Peter Hewett" <Nospam@xtra.co.nz> a ,crit dans le message de
> > news:Xns947E679024859Iwlpth@207.46.248.16...
> >> Hi Gunther
> >>
> >> The code snippet looks ok. I'd check that Word is using the printer you
> >> expect, try:
> >>
> >> objWord.ActivePrinter
> >>
> >> if it's not correct you can use :
> >>
> >> ActivePrinter = "Your printer name here"
> >>
> >> This code will however also change the system dafault printer! If you
> want
> > to
> >> just select a printer WITHOUT changinging the default printer check out
> > the
> >> code at this URL:
> >>
http://word.mvps.org/FAQs/MacrosVBA/ChangeCurPrinter.htm
> >>
> >> HTH + Cheers - Peter
> >>
> >> "G?nter Brandst"tter" <me@ho.me> wrote in news:O8nEufQ5DHA.2576
> >> @TK2MSFTNGP11.phx.gbl:
> >>
> >> > Hi all,
> >> > if want to print a range of pages by code, it will not work.
> >> > I use
> >> > objWord.ActiveDocument.PrintOut True, Range:=wdPrintFromTo,
> > From:=FromPage,
> >> > To:=ToPage
> >> >
> >> > even with the Pages-Argument in this line and Range:
> =wdPrintRangeOfPages
> >> > my printer rests quiet.
> >> >
> >> > Can anyone tell me why?
> >> > any answer appreciated
> >> > G?nter
> >
>