Guys,
I am importing a data table from Excel into word. All works well except for the first column of my data, which contains numbers formatted as currency. I am using a bunch of loops to transfer the data into word, and for each cell the code looks like this:
docRow.Cells(column - 2).range.Text = Worksheets(iw).Cells(iwwww, column).Value
Is there a way to tweak the code and preserve the formatting when I am importing numbers into word?
I tried the following code but it gives me type mismatch error:
For column = 3 To 11
If column = 3 Then
docRow.Cells(column - 2).range.Text = Format(Worksheets(iw).Cells(iwwww, column).Value, [currency])
Else
docRow.Cells(column - 2).range.Text = Worksheets(iw).Cells(iwwww, column).Value
End If
Next
Thanks,
D.
Bookmarks