E
elziko
I'm trying to create a new table in word from a DataTable (sourceTable):
objDoc.tables.Add(Range:=objDoc.Range, NumRows:=sourceTable.Rows.Count,
NumColumns:=sourceTable.Columns.Count, DefaultTableBehavior:=1,
AutoFitBehavior:=0)
Where objDoc is a Word.Document. However I'm always given the error message
"The range cannot be deleted". But I'm not trying to delete a range. I'm
just trying to insert this Table at the caret position in the document.
I'd appreciate any help!
objDoc.tables.Add(Range:=objDoc.Range, NumRows:=sourceTable.Rows.Count,
NumColumns:=sourceTable.Columns.Count, DefaultTableBehavior:=1,
AutoFitBehavior:=0)
Where objDoc is a Word.Document. However I'm always given the error message
"The range cannot be deleted". But I'm not trying to delete a range. I'm
just trying to insert this Table at the caret position in the document.
I'd appreciate any help!