Hi
I create a word file and design it’s bookmarks.
Then in application, user enter personal code, and program search in DB for name and family. Then send them to word.
Now I wants to put it in a ring. And send group of records for all personal of company. (no individual).
How should I do this?
Thanks
object Name = "Name";
object family = "family";
string maghsad_file = System.Windows.Forms.Application.StartupPath + "\\main_template.docx";
if (File.Exists(maghsad_file))
{
object file = maghsad_file;
object nullobj = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Application wd;
Microsoft.Office.Interop.Word.Document wdDoc;
wd = new Microsoft.Office.Interop.Word.Application();
wdDoc = new Microsoft.Office.Interop.Word.Document();
wdDoc = wd.Documents.Open(ref file, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj);
wdDoc.Bookmarks.get_Item(ref Name).Range.Text = name.Text;
wdDoc.Bookmarks.get_Item(ref family).Range.Text = family_2.Text;
wd.Visible = true;
}
What I have tried:
i don't kwnow what should i do.
........................
thanks