As an interim suggestion, how about adjusting the range of sections, e.g.
Dim i As Long
For i = 1 To ActiveDocument.Sections.Count Step 3
ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" &
trim(cstr(i+2))
Next i
Peter Jamieson
> Doug was VERY helpful and provided me with a macro that would run from the
> merged document and print each record as a separate job. The problem I
[quoted text clipped - 13 lines]
>
> Any help would be greatly appreciated!
craig friend - 18 Jun 2005 01:00 GMT
Thanks for the suggestion...I'll have to try that one.
I actually added two other variables
Dim i As Long
Dim k As Long
Dim j As Long
k=1
j=3
For i = 1 To ActiveDocument.Sections.Count
ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="s" & k, To:="s" & j
k=k+3
j=j+3
Next i
craig friend - 18 Jun 2005 01:03 GMT
Correction:
Dim i As Long
Dim k As Long
Dim j As Long
k=1
j=3
For i = 1 To ActiveDocument.Sections.Count/3
ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="s" & k, To:="s" & j
k=k+3
j=j+3
Next i
Peter Jamieson - 18 Jun 2005 09:28 GMT
If it works, it works. but just out of interest, why not use the "Step"
keyword in the For statement? as I suggested? It just seems a bit more
straightforward to me.
Peter Jamieson
> Correction:
>
[quoted text clipped - 11 lines]
>
> Next i
craig friend - 20 Jun 2005 12:42 GMT
Peter...thanks again!
It did work...but the your's is much cleaner. I just wasn't aware of Step
keyword.
Thanks again for all your help!