Error to access Row

D

Dezaum

I dont know how to insert a image here, so i will draw.

I have a table like this
__________
|__|______|
|__|______|

I can access the table with this code, and add a new row on my table

Object oMissing = System.Reflection.Missing.Value;

object oTemplateCapa = @"E:\teste.doc";

Object oTrue = true;
Object oFalse = false;

Word.Application oWord = new Word.Application();
Word.Document oWordDoc = new Word.Document();
oWord.Visible = true;

oWordDoc = oWord.Documents.Add(ref oTemplateCapa, ref oMissing,
ref oMissing, ref oMissing);

object beforeRow = oWordDoc.Tables[1].Rows[1];
Word.Rows row = oWordDoc.Tables[1].Rows;
row.Add(ref beforeRow);

But the table below, the position of the colunms are different, and i cant
access this table
__________
|__|___|__|
|____|____|

Why i cant access, and why i can resolve this problem? Thankyou!
 

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