Printing Sections?

D

Dawn

I have a number of fields on a template the results of which drive different paragraphs to be added into a letter(within the template). Once all the fields have been updated by the user, the letter is then ready for printing. I'm trying to write a macro to print the letter but cannot find a way to print 'sections' rather than pages. The pages numbers on which the letter starts and finishes will vary depending on the user inputs but it will always appear in section 5 of the template. Is there any way i can isolate section 5 for printing or are there any other suggestions as to how i can print the letter section of this template
Thank
Dawn
 
A

Alex Ivanov

With ActiveDocument.Sections(5).Range
.MoveEnd wdCharacter, -1
.Select
End With
ActiveDocument.PrintOut , , wdPrintSelection

Dawn said:
I have a number of fields on a template the results of which drive
different paragraphs to be added into a letter(within the template). Once
all the fields have been updated by the user, the letter is then ready for
printing. I'm trying to write a macro to print the letter but cannot find a
way to print 'sections' rather than pages. The pages numbers on which the
letter starts and finishes will vary depending on the user inputs but it
will always appear in section 5 of the template. Is there any way i can
isolate section 5 for printing or are there any other suggestions as to how
i can print the letter section of this template.
 
J

Jean-Guy Marcil

Bonjour,

Dans son message, notre ami < Dawn > nous laissait savoir que :
In this message, our friend < Dawn > informed us that:


|| I have a number of fields on a template the results of which drive
|| different paragraphs to be added into a letter(within the template).
|| Once all the fields have been updated by the user, the letter is
|| then ready for printing. I'm trying to write a macro to print the
|| letter but cannot find a way to print 'sections' rather than pages.
|| The pages numbers on which the letter starts and finishes will vary
|| depending on the user inputs but it will always appear in section 5
|| of the template. Is there any way i can isolate section 5 for
|| printing or are there any other suggestions as to how i can print
|| the letter section of this template. Thanks
|| Dawn

'_______________________________________
Minimally, what you need is something like (to print section 5for example):

ActiveDocument.PrintOut _
Range:=wdPrintRangeOfPages, Pages:="s5"
'_______________________________________

Look up the PrintOut methos in the VBA help for information regarding the
other parameters.
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top