Microsoft Word Table: use Microsoft Excel Cell formatting

Excel screenshot

How can I make cells in Microsoft Word look like the above.

This is what I have so far in the VBA in the Microsoft Word Document which is not bringing over the format from Excel

Set oExcel = New Excel.Application
Set oWB = oExcel.Workbooks.Open(ActiveDocument.Path & "\RevExpenditureTable.xlsx")

Application.ScreenUpdating = True

For Each t In xdoc.SelectNodes("//table")
    For Each r In t.SelectNodes("row")
        For Each c In r.SelectNodes("cell")
            If c.getAttribute("param") <> "" And c.getAttribute("package") <> "" Then
                oExcel.Visible = True
                oWB.ActiveSheet.Cells(1, 1).Value = 10000
                ActiveDocument.Tables(1).Cell(CInt(r.getAttribute("row")), CInt(c.getAttribute("position"))).Range.Text = oWB.ActiveSheet.Cells(1, 1).Value
            End If
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NorieAnalyst Assistant Commented:
Try changing Value to Text.
                ActiveDocument.Tables(1).Cell(CInt(r.getAttribute("row")), CInt(c.getAttribute("position"))).Range.Text = oWB.ActiveSheet.Cells(1, 1).Text

Open in new window

maxdbaseAuthor Commented:

That brought it a lot closer.  The $ sign is not positioned to the left though.
NorieAnalyst Assistant Commented:
The Text property should return the value from the cell exactly as it's displayed.

Do you have any settings in Word that might eliminate spaces?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
maxdbaseAuthor Commented:
I have not found a setting. However, I tried another computer and got something that looks good.
Not sure if I will get it to work, but will award points as this got me closer :-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.