Info

'Import data to the first table and in the first column of a ten-row table. For Each wdCell In wdDoc.Tables(1).Columns(1).Cells i = i + 1

wdCell.Range.Text = vaData(i, 1) Next wdCell

'Save and close the document. With wdDoc .Save .Close End With

'Close the hidden instance of Microsoft Word. wdApp.Quit

'Release the external variables from the memory Set wdDoc = Nothing Set wdApp = Nothing

MsgBox "The data has been transfered to Test.doc.", vblnformation End Sub

0 0

Post a comment