Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Export % from Excel to Word as %

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
export excel to word kath New Users to Excel 1 April 9th 09 10:22 PM
export from excel to word lermar New Users to Excel 3 November 9th 08 02:41 PM
Export from Excel to Word Kaz G Charts and Charting in Excel 0 March 28th 07 02:52 PM
Export from Excel to Word kath0178 New Users to Excel 2 September 13th 06 05:30 PM
export from excel to word Curious[_4_] Excel Programming 1 June 4th 04 10:56 PM


All times are GMT +1. The time now is 11:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"