OK, Sections we can work with. If you can determine the number of the
Section that you want to save as a separate document, you can use:
Dim i As Long
i = [the number of the section that you want to save]
Dim source As Document, target As Document
Set source = ActiveDocument
Set target = Documents.Add
target.Range.FormattedText = source.Sections(i).Range.FormattedText
target.SaveAs "Drive:\Path\Filename"
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
Peter KNAP said:
I have form where 9 sections are created.
every section belongs to special kind of case I am deling with.
So if user select case 1, UserForm ask him to fill in only FormFields
belonging to this section and at the end is macro for printing only
filled
pages . if user need to use case 2 macro leads him through formfields
for
this section etc....
It could be made every section in single separate document but the goal
is
to have all the cases in one template.
P.
"Doug Robbins - Word MVP" napísal (napísala):
Yes, except that "pages" is a bit undefined in that the layout of the
pages
will depend upon the printer that is active in Word. I imagine that
in
your
case though, there may be some other way to define exactly what part
of
the
document it is that you want to save as a file by itself..
If you provide more information, it will be pretty straightforward to
come
up with the necessary code.
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
Hi wise people.
I created form with macros and some UserForms for filling form
fields.
This form have a lot of pages so I would like to add the button to
UserForm
for saveing only special part of document (for example pages 3 to 6)
since
no
all pages are in some cases necessary and could cause
misunderstandings.
Does
VBA give possibility for creating macro for something like that?
many thanks
Peter.