

Set objTemplateSheetExcelApp = CreateObject("Excel.Application") Ok I am attaching the remaining piece of code as well 'Creating TemplateSheet object

Then for all the tables present in the word doc accessing each row and column of the tables using the above mentioned code.

I am running a table count on the word file. MsgBox "This document contains no tables", _ TableNo = '(Counting no of tables in the document) Set wdDoc = GetObject(wdFileName) '(open Word file) If wdFileName = False Then Exit Sub '(user cancelled import file browser) "Browse for file containing table to be imported") '(Browsing for a file) The logic I am using is as follows - wdFileName = Application.GetOpenFilename("Word files (*.*),*.*",, _ ObjTemplateSheetExcelSheet.Cells(1, 2) = WorksheetFunction.Clean(.cell(iRow, iCol).Range.Text) Kindly let me know how I can edit this so as to preserve source formatting. Now i want to preserve the source formatting present in word doc. It is copying the text perfectly as desired. I am trying to copy some data from a word table to an excel sheet using a VB Macro.
