multiple page merge doc with multi sections, need to staple

A

amie

i have been using the formula to be able to staple multi pages of a merged doc
Dim i As Long
With ActiveDocument
For i = 1 To .Sections.Count
.PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" & i
Next i
End With
this would work if my multi doc didn't already have multi sections which
seems to be difficult to reformat
is there anyway to in vb merge to doc using some insertbreak? please help
 
D

Doug Robbins

If your document contains 2 sections, use
Dim i As Long
With ActiveDocument
For i = 1 To .Sections.Count Step 2
.PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" & i + 1
Next i
End With

If it contains n sections, replace 2 with n and 1 with n - 1

--
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
 
D

Debi

thank you, you have saved my job.
--
dm


Doug Robbins said:
If your document contains 2 sections, use
Dim i As Long
With ActiveDocument
For i = 1 To .Sections.Count Step 2
.PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" & i + 1
Next i
End With

If it contains n sections, replace 2 with n and 1 with n - 1

--
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
 
A

amie

IT GETS BETTER!
i just found out that this document("DOCUMENT2") which needs to be stapled
and duplexed needs to have a page from another merge document("DOCUMENT1"),
printed before each stapled portion. is that possible to reference to print
1ST RECORD OF merged DOCUMENT1 within a macro within DOCUMENT2? OR SHOULD I
COPY AND PASTE DOCUMENT1 INTO DOCUMENT2 AND MERGE TOGETHER(THE DATABASE IS
THE SAME FOR BOTH), BUT I WOULDN'T SEE HOW YOU COULD TELL THE PRINTER TO NOT
STAPLE AND DUPLEX THAT FIRST PAGE APART FROM THE OTHER PAGES. IF THERE ISN'T
A WAY TO DO THIS, HOW ABOUT PREPRINTING DOCUMENT1 AND ASKING THE PRINTER TO
PRINT A SEPERATOR SHEET(WHICH IS USUALLY A BLANK SHEET THAT PRINTS BETWEEN
SPOOLS). OF COURSE I RUN INTO THE PROBLEM OF GETTING THEM OUT OF ORDER IF THE
PRINTER JAMS. WHICH DO YOU THINK WILL WORK. I PREFER TO LEAVE DOCS AS IS
WITHOUT COPYING AND PASTING, BUT WILL DO WHICHEVER YOU THINK WILL WORK BEST.
 
D

Doug Robbins

If you have the text of the two documents in the one mailmerge main
document, Word will have no idea of the origin of the parts of the document.

--
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
 
A

amie

the only reason i am hesitant to copy and paste, is sometimes it seems that
some of the formatting is lost. but how do you create a macro to do this?
 
D

Doug Robbins

If, as it seems from your later post, you want document 2 stapled by itself
with the relevant document 1 interleafed between each stapled document 2,
unless you have a really fancy printer, I think you will have to do the
collating manually.

--
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
 

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