A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Error to access Row



 
 
Thread Tools Display Modes
  #1  
Old October 27th, 2009, 01:20 PM posted to microsoft.public.word.tables
Dezaum
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!
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:59 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.