Hi all,
I apologize for what is probably a ridiculously simple question. I'm a relative newcomer to Word VBA (I've been programming in Access for a couple years now), and I need to update some templates.
Imagine something like your manual tax return. That's kind of what these templates look like: they contain a lot of text, and a lot of table fields and "fill-in-the-blank" areas. All of the text is written into the template itself, but the data needs to be filled in by code, after the user inputs it into a userform.
Currently, all of the areas that require data (about 40 of them) have unique mailmerge fields in them. At the end of the data-entry, the user clicks a "continue" or "finish" button, which adds MailMerge sets to the document based on the data in the form.
This works, but it seems like there should be a much easier way to do it to me. One that doesn't require hard-coding over 40 mail-merge names into the code. So I'm looking for a better way. It just seems like there should be a much more direct way of adding data to a document than this. Or isn't there? :-I
Thanks in advance for any help you can provide!
I apologize for what is probably a ridiculously simple question. I'm a relative newcomer to Word VBA (I've been programming in Access for a couple years now), and I need to update some templates.
Imagine something like your manual tax return. That's kind of what these templates look like: they contain a lot of text, and a lot of table fields and "fill-in-the-blank" areas. All of the text is written into the template itself, but the data needs to be filled in by code, after the user inputs it into a userform.
Currently, all of the areas that require data (about 40 of them) have unique mailmerge fields in them. At the end of the data-entry, the user clicks a "continue" or "finish" button, which adds MailMerge sets to the document based on the data in the form.
This works, but it seems like there should be a much easier way to do it to me. One that doesn't require hard-coding over 40 mail-merge names into the code. So I'm looking for a better way. It just seems like there should be a much more direct way of adding data to a document than this. Or isn't there? :-I
Thanks in advance for any help you can provide!