View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Export % from Excel to Word as %

One way:

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


In article ,
Philippe Perrault wrote:

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.T ext =
Range("E1").Value

end with
set appwd=nothing