Hi Jana,
There is no practical way for the code to 'know' whether there are any more headings to include at the time it is adding each one. The only practical way of adding in a stop is to do so after all of the headings have been added to StrTxt and before they are written into the document. To do that, you could change:
StrTxt = "{" & Left(StrTxt, Len(StrTxt) - 2) & "}"
to:
StrTxt = "{" & Left(StrTxt, Len(StrTxt) - 2) & ".}"
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|