Hi Friends,
I want to copy a table on an Excel worksheet to a MS Word document. A copy and paste method worked when I tried it manually.
Can we directly pass a word document object to the excel copy method? Please suggest me some way to copy an excel worksheet table to a word document.
I want to copy a table on an Excel worksheet to a MS Word document. A copy and paste method worked when I tried it manually.
Can we directly pass a word document object to the excel copy method? Please suggest me some way to copy an excel worksheet table to a word document.
Func _TableCopy($sExcelFile, $sWordDocument) $oExcel = ObjCreate("Excel.Application") ;create Excel object $oWordApp = _WordCreate ($sWordDocument, 0, 0) $oDocuments = _WordDocGetCollection ($oWordApp,1) $oExcel.WorkBooks.Open($sExcelFile) ;Open input file $oExcel.Application.ActiveWorkbook.Sheets($aSheetNames[1]).Copy() $oExcel.Quit ;Quit Excel EndFunc ;=>_TableCopy