Export % from Excel to Word as %

P

Philippe Perrault

I am exporting values of certain Excel Cells to a Word Template. Some of the
cells contain a percentage which is displayed like this in excel: 44.44%.
When I export that value to Word it comes out like this: 0.444444444 How do
I make sure the data gets to Word as 44.44%?

Current Code is below.

Thanks

Dim myPath As String
Dim appwd As Object
myPath = "C:\Documents and Settings\My Documents\Template.docx

Set appwd = GetObject(, "Word.Application")

appwd.Visible = True
With appwd
.documents.Add Template:="myPath"
appwd.activedocument.bookmarks("Whatever").Range.Text =
Range("E1").Value

end with
set appwd=nothing
 
J

JE McGimpsey

One way:

With appwd
.documents.Add Template:="myPath"
.activedocument.bookmarks("Whatever").Range.Text = _
Range("E1").Text
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top