Hi all,
I am trying to import a value from Excel to Word using the bookmarks in Word but cannot get it to import fully i.e. $1203.10 would import as 1203.1
Why is it missing the zero off the value and is there anyway to import it as its in excel in currency?
Sub Contents()
Dim objWord As Object
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("SER_INC_INVOICE")
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
objWord.Documents.Open "O:\Despatch\Customs\CUSTOMS INVOICES\CONTENTS II.doc"
With objWord.ActiveDocument
.Bookmarks("Date").Range.Text = ws.Range("M3").Value
.Bookmarks("Value2").Range.Text = ws.Range("N5").Value = "$ #,##0.00_)"
End With
objWord.PrintOut
Application.Wait Time + TimeValue("00:00:03")
objWord.Quit SaveChanges:=wdDoNotSaveChanges
Set objWord = Nothing
End Sub
Display More
How do I get it to import exactly as the value in N5 cell?
I tried this with paste-special as link in Word but since the word doc is used with another excel file also it would have two values.
Thanks guys