Hi I am trying to copy Cells from excel sheet and populating word document. I want to copy text from excel cells to a specific place in word document. I am able to store the text from excel cells in a string, but not sure how to make it store in a word placeholder or bookmark that I have mentioned in my word doc. This is what I have so far:
Set ws = xlBook.Worksheets("DIP Main")
Tmp = ws.Cells(25, "C").Value
.Text = Tmp
.Execute Replace:=("Placeholder1")
' [Placeholder1] = Tmp.Text
' MyDOc.Fields("Placeholder1") = Tmp.Valu
e
Tmp is storing value from excel, but I am not able to replace and print it in the placeholder on my word document, or if there is any other way of printing Tmp string in a specific location of word doc that would work too. Also im not declaring any placeholder in my code, I am not sure if i am supposed to. I have created place holder in the word document itself called "Placeholder1". I am using VBA word to code it.
For Full code please refer to this: How to copy excel range from a sheet and place it into a specific place it into a specific place in word using word vba