P
Picho
Hi all,
I have a problem automating word (office xp).
I am trying to create a mailmerge datasource using this code:
object oFieldsVector = (object)fieldsVector;
object oFileName = "doc123";//aDoc.Name;
aDoc.MailMerge.CreateDataSource(ref oFileName, ref missing, ref missing, ref
oFieldsVector, ref missing, ref missing, ref missing, ref missing, ref
missing);
aDoc.MailMerge.EditDataSource();
Word.Document aTable = WordApp.ActiveDocument;
Word.Table table = aTable.Tables.Item(1);
for (int j=1;j<dataSource.Rows.Count;j++)
{
table.Select();
table.Rows.Add(ref missing);
}
the problem is that when i get to the row adding part, a dialog opens up in
the word application asking something about the columns.
this issue never came up in all MS and others examples on the web.
did anyone see this too?
what am i doing wrong? (this is actually almost coppied from MSDN sample).
thanx,
Picho
I have a problem automating word (office xp).
I am trying to create a mailmerge datasource using this code:
object oFieldsVector = (object)fieldsVector;
object oFileName = "doc123";//aDoc.Name;
aDoc.MailMerge.CreateDataSource(ref oFileName, ref missing, ref missing, ref
oFieldsVector, ref missing, ref missing, ref missing, ref missing, ref
missing);
aDoc.MailMerge.EditDataSource();
Word.Document aTable = WordApp.ActiveDocument;
Word.Table table = aTable.Tables.Item(1);
for (int j=1;j<dataSource.Rows.Count;j++)
{
table.Select();
table.Rows.Add(ref missing);
}
the problem is that when i get to the row adding part, a dialog opens up in
the word application asking something about the columns.
this issue never came up in all MS and others examples on the web.
did anyone see this too?
what am i doing wrong? (this is actually almost coppied from MSDN sample).
thanx,
Picho