PDA

View Full Version : Solved: Reset line numbers in bulleted list



jwise
10-25-2012, 01:03 PM
Hi,

I have an Excel macro which sends to Word some data. Word builds a 4 page letter(survey). I loop to the next data row and send this data again.

The original code printed each Word document and could generate 1200+ letters which tied up the printer for a couple of hours. I have modified this code to create a single Word document (which actually becomes a PDF) so it enables me to print a few surveys, allow other users print time, and continue my process.

The survey questions are bulleted and numbered, but each survey continues the number sequence instead of starting over. I can't find the solution. Here's a code fragment:

Set wrdApp = New Word.Application

wrdApp.Documents.Add

For i = 1 to rowNum
rngDoc.InsertFile _
Filename:="c:\survey\SQL\Survey01.dot"
'
' Put data in bookmarks
'
next i


I delete all the bookmarks before I insert the next survey. Again the problem is the survey questions do not reset to one in the loop so the numbers get large which makes the document not fit.

Thanks