Using MailMerge from C#.NET

C

Csabi

Hi!

I would like to insert data (text) into Word document with the MailMerge
functionality.

Is it possible to do this without using DataSources!? It would be nice, to
iterate through the MailMerge.Fields and insert data text) into their
position.

I tried to do this :

int x = 0;

Range rng = MailMerge.Fields[x].Code;
rng.Text = "New Text";

The 'rng' object is valid, becasue it's text contains " MERGEFIELD \"Name\"
", butif I set it's Text property to the new value, still the field is shown
in Word.

Any help or solution anyone!?

Also is it possible to create a datasource to use MailMerge which is not an
exact file ?! I red that OLEDB, ODBC and DDE can be used as datasources, but
they all point to ane xisting file. I'm not getting the isnertable data from
a file, so I would need a different solution.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top