Hi,
I'm trying to create a number of sets of labels. Each set will have all combinations of a set of options eg.
[a-e][1-5][m-p][2-4] would give a list of labels a1m2, a1m3, a1m4, a1n2 etc...
I've not done any vba before, but thought this might be the way to go, since these will need to be produced in word. Anyway... I've written the code to read in the various options to be combined, and that all works. And I've set up mail merge documents (data source and template). But the data source is obviously empty, until the user has run the macro and filled in the form.
So I tried using
ActiveDocument.Mailmerge.DataSource.ActiveRecord("fieldname") =value
to set the field value for each field name - in a loop one record for each combination (incrementing activerecord each time). But it appears this property is read only. So how do I edit my Datasource from within the VBA code?
Thanks
I'm trying to create a number of sets of labels. Each set will have all combinations of a set of options eg.
[a-e][1-5][m-p][2-4] would give a list of labels a1m2, a1m3, a1m4, a1n2 etc...
I've not done any vba before, but thought this might be the way to go, since these will need to be produced in word. Anyway... I've written the code to read in the various options to be combined, and that all works. And I've set up mail merge documents (data source and template). But the data source is obviously empty, until the user has run the macro and filled in the form.
So I tried using
ActiveDocument.Mailmerge.DataSource.ActiveRecord("fieldname") =value
to set the field value for each field name - in a loop one record for each combination (incrementing activerecord each time). But it appears this property is read only. So how do I edit my Datasource from within the VBA code?
Thanks