View Single Post
  #1   Report Post  
Posted to microsoft.public.word.tables
Dezaum Dezaum is offline
external usenet poster
 
Posts: 1
Default Error to access Row

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!