Hi nair thanks for your reply actually my problem is i want text(some text outside the table like name) and table side by side .here if i am generating table programatically it is coming below the text.here is the sample code
wrdSelection.TypeText("Name");
// Insert a new tablewith 6 rows and 3 columns.
wrdTable = wrdDoc.Tables.Add(wrdSelection.Range, 6, 3,
ref oMissing, ref oMissing);
// Set the column widths.
object format = Word.WdTableFormat.wdTableFormatGrid1;
wrdTable.AutoFormat(ref format, ref oTrue, ref oTrue, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oTrue);
wrdTable.Columns[1].SetWidth(100, Word.WdRulerStyle.wdAdjustNone);
wrdTable.Columns[2].SetWidth(175, Word.WdRulerStyle.wdAdjustNone);
wrdTable.Columns[3].SetWidth(175, Word.WdRulerStyle.wdAdjustNone);
Vijaya.A
Contributor
2408 Points
629 Posts
Problem with worddocument
Jan 02, 2010 06:13 AM|LINK
Hi i am preparing the word document using asp.net there is problem with my requirement.
my requirement is
this text & table sould be side by side .can any one help how to do it programatically
Some text
suthish nair
All-Star
15176 Points
3304 Posts
Re: Problem with worddocument
Jan 02, 2010 07:10 AM|LINK
??? .. please explain...
My Blog
Vijaya.A
Contributor
2408 Points
629 Posts
Re: Problem with worddocument
Jan 02, 2010 07:42 AM|LINK
Hi nair thanks for your reply actually my problem is i want text(some text outside the table like name) and table side by side .here if i am generating table programatically it is coming below the text.here is the sample code
wrdSelection.TypeText("Name"); // Insert a new tablewith 6 rows and 3 columns. wrdTable = wrdDoc.Tables.Add(wrdSelection.Range, 6, 3, ref oMissing, ref oMissing); // Set the column widths. object format = Word.WdTableFormat.wdTableFormatGrid1; wrdTable.AutoFormat(ref format, ref oTrue, ref oTrue, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oTrue); wrdTable.Columns[1].SetWidth(100, Word.WdRulerStyle.wdAdjustNone); wrdTable.Columns[2].SetWidth(175, Word.WdRulerStyle.wdAdjustNone); wrdTable.Columns[3].SetWidth(175, Word.WdRulerStyle.wdAdjustNone);//fill the rows etc
Vijaya.A
Contributor
2408 Points
629 Posts
Re: Problem with worddocument
Jan 04, 2010 04:39 AM|LINK
Hi any help regarding this problem
suthish nair
All-Star
15176 Points
3304 Posts
Re: Problem with worddocument
Jan 04, 2010 05:13 AM|LINK
you need to set Name first by selecting range..
ex: range(1,6) table name, range(2,3) table1, range(4,6) table2
hope this your looking for..
My Blog
Vijaya.A
Contributor
2408 Points
629 Posts
Re: Problem with worddocument
Jan 04, 2010 05:46 AM|LINK
Hi i want show the screenshot of my requirement how to post it
suthish nair
All-Star
15176 Points
3304 Posts
Re: Problem with worddocument
Jan 04, 2010 06:37 AM|LINK
You can insert image path by clicking Insert/Edit image icon in editor here..
My Blog
Vijaya.A
Contributor
2408 Points
629 Posts
Re: Problem with worddocument
Jan 04, 2010 06:48 AM|LINK
Hi i am unable to preview the imahe is there any other way to post it?
Vijaya.A
Contributor
2408 Points
629 Posts
Re: Problem with worddocument
Jan 04, 2010 06:48 AM|LINK
Hi i am unable to preview the image is there any other way?
suthish nair
All-Star
15176 Points
3304 Posts
Re: Problem with worddocument
Jan 04, 2010 06:58 AM|LINK
send me suthish.s.nair@gmail.com
My Blog