TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Justin
NA
1
0
Ending a word table
Aug 18 2009 4:38 PM
So I am trying to generate a table in a word document. This is what I have.
Microsoft.Office.Interop.Word.
Table
oTable;
oTable = wordApp.Selection.Tables.Add(wordApp.Selection.Range, 1, 4,
ref
missing,
ref
missing);
oTable.Range.ParagraphFormat.SpaceAfter = 4;
oTable.Rows.Add(
ref
missing);
oTable.Cell(1, 1).Range.Text =
"text1"
;
oTable.Cell(1, 2).Range.Text =
"text2"
;
oTable.Cell(1, 3).Range.Text =
"text3"
;
oTable.Cell(1, 4).Range.Text =
"text4"
;
oTable.Borders.InsideLineStyle = Microsoft.Office.Interop.Word.
WdLineStyle
.wdLineStyleSingle;
oTable.Borders.OutsideLineStyle = Microsoft.Office.Interop.Word.
WdLineStyle
.wdLineStyleDouble;
This works fine except I can't seem to exit out of the table. If I put:
wordApp.Selection.TypeText(
"some text"
);
It will put that into the last cell. How do I close the table? Right now, it is inside of a loop with other information but it will put everything into the table again and again.
How do I close the table.
Reply
Answers (
1
)
Controlling other control,when receiveng data from serial port.
How much memory will be allocated during execution of a single exe?