I'm trying to replace a word in .rtf file by multiple values. I wrote a code which calculates how many values needs to be replaced and replaces them.

staffCount = frmProposalLetter.lstSelected.ListCount
For idIndex = 0 To staffCount - 1
strRef = frmProposalLetter.lstSelected.List(idIndex)
rtbCoverLetter = Replace(rtbCoverLetter, "#Reference#", strRef, staffCount, vbTextCompare)
Next

I thought that each time when it goes through the loop a new value is added as many times as the value of staffCount is but instead it saves just the last value.
Can anybody help?

Thank you!