K
Klaus Linke
Say I've got
Dim myParas As Paragraphs
Dim myPara As Paragraph
' myParas = first and second paragraph in doc
Set myParas = ActiveDocument.Range(0,
ActiveDocument.Paragraphs(2).Range.End).Paragraphs
' myPara = fifth paragraph in doc
Set myPara = ActiveDocument.Paragraphs(5)
.... then there is no way to add myPara to myParas, so that myParas contains
the first, second, and fifth paragraph?
One could use an array to store the paragraphs (either an array of the
paragraphs themselves, or of their index number), but putting them in the
collection would seem a nicer way, if it were possible.
The collection probably simply does not work like that ... but I thought it
might be worth checking if I've missed something.
Regards,
Klaus
Dim myParas As Paragraphs
Dim myPara As Paragraph
' myParas = first and second paragraph in doc
Set myParas = ActiveDocument.Range(0,
ActiveDocument.Paragraphs(2).Range.End).Paragraphs
' myPara = fifth paragraph in doc
Set myPara = ActiveDocument.Paragraphs(5)
.... then there is no way to add myPara to myParas, so that myParas contains
the first, second, and fifth paragraph?
One could use an array to store the paragraphs (either an array of the
paragraphs themselves, or of their index number), but putting them in the
collection would seem a nicer way, if it were possible.
The collection probably simply does not work like that ... but I thought it
might be worth checking if I've missed something.
Regards,
Klaus