export data from excel to word, then format

Rick2000

New Member
Joined
May 6, 2011
Messages
4
Hi,

I am trying copy numbers from excel to bookmarked locations in word. I have managed to do the copying. I would like to format the numbers in word to (#,###.00) but don't know how. Does anyone know?

Thanks, Rick.

my codes are:

Sub OpenWordDoc()
Dim wdapp As Word.Application
Dim wddoc As Word.Document
Dim wdrange As Word.Range
Dim aaa As Excel.Range
Dim bbb As Excel.Range

Set aaa = Sheets("sheet1").Range("B2")
Set bbb = Sheets("sheet1").Range("E2")

Set wdapp = CreateObject("Word.Application")
If Err.Number <> 0 Then
Set wdapp = CreateObject("word.application")
End If
On Error GoTo 0

Set wddoc = wdapp.Documents.Open("C:\Documents.docx")

wdapp.Visible = True

Set wdrange = wddoc.Goto(what:=wdGoToBookmark, Name:="aaa")
wdrange.Text = aaa

End Sub
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Can you set the format before the cells are copied across like this

Selection.NumberFormat = "0.00"
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,134
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top