S
Sanya Ibrahim
Hello all,
I am trying to add a table to a new word 2007 document i created through an
excel macro. I wanted to add the data from the excel sheet to this table.
After creating the document, i added some text through
selction.TypeText("text") and added some paragraph marks through
selection.TypeParagraph methods. I tried to add the table through the
following code:-
word.selection.EndKey mode:=wdStory, Extend:=wdMove
Dim tble as Word.Table
set tble = Word.Selection.Tables.add(word.range,2,8)
On execution of the last line, all previously entered text is deleted
from the document and the table is added in its place.
Can any one tell me, how to overcome this issue? Should I post it in
the Excel Macro section?
Thanks and regards,
Sanya
I am trying to add a table to a new word 2007 document i created through an
excel macro. I wanted to add the data from the excel sheet to this table.
After creating the document, i added some text through
selction.TypeText("text") and added some paragraph marks through
selection.TypeParagraph methods. I tried to add the table through the
following code:-
word.selection.EndKey mode:=wdStory, Extend:=wdMove
Dim tble as Word.Table
set tble = Word.Selection.Tables.add(word.range,2,8)
On execution of the last line, all previously entered text is deleted
from the document and the table is added in its place.
Can any one tell me, how to overcome this issue? Should I post it in
the Excel Macro section?
Thanks and regards,
Sanya