MergeFields in Word Docs

We are working on developing a Mail Merge type of functionality for one of our clients using this tool.

They have about 30 word docs that will be merged with data from their mainframe.

Each of the word docs they have provided to me could have from 5 to 10 fields and I’d prefer to not build a function for each word doc there may be.

I’m trying to build an efficient function that will accept an array of fieldnames and an array of the values associated with those fieldnames.

Is there an example of how to pass in a variable number of fields/values to a merge file?

I’m not sure if I’m explaining this clearly enough, but please let me know.

Thanks,

Josh

Yes, your question is quite clear. We have a very good article in our Wiki, explaining how that could be done:

https://docs.aspose.com/words/net/mail-merge-and-reporting/