The only way to deal with this in Building Blocks (the kind of quick part I think you are talking about) is by having multiple ones with different numbers of rows.
Automated Boilerplate Using Microsoft Word
You might want to explore using a UserForm.
Create a Simple Userform
This may be a bit more complex since it involves vba.