Hi
I have this macro which supposed to copy the specific cell’s value to certain location in Word, but it doesn’t seem
to be working as expected. The “xlvalue2” and “xlvalue3” doesn’t seem to be paste into the Word at all.
There is no error message. I am not sure what goes wrong here. Pls assist what need to be change in the
following codes.
Sub exceltoword()
Dim objWord As New Word.Application
Dim doc As Word.Document
Dim bmk As Word.Bookmark
Set doc = objWord.Documents.Open(“C:My DocumentsMyfile.doc”)
doc.Bookmarks(“xlvalue1”).Range.Text = Range(“A1”).Value
doc.Bookmarks(“xlvalue2”).Range.Text = Range(“N3”).Value
doc.Bookmarks(“xlvalue3”).Range.Text = Range(“A7”).Value
objWord.Visible = True
End Sub
TIA.
regards, francis