PDA

View Full Version : Copying vales with their number format from Excel into a word table



RosieO
08-10-2020, 06:10 AM
Hello,
I am able to copy and paste an excel table into a Word table but the number formatting from excel is lost and instead all values treated like text. Please can anyone tell me what I need to modify in the code below, so that a number like 1,234 gets copied with the comma separator and not just 1234. Many thanks

' Loop through each row of the table in word
For i = 1 To RowCount
For j = 1 To ColCount
wrdTbl.Cell(i, j).Range.Text = Tbl.Cells(i, j)

Next j
Next i
End With