You might want to look at
Create a Simple Userform
That is about vba rather than visual basic but covers the basics.
Why are you generating a template rather than a document? You might want to start with a template that calls your userform when called to create a new document and then populates the document from information in the userform.