sqleptical
Programmer
Does anyone have a VBA code snipet that will assign a Word Merge field a value from the Excel sheet that the macro is ran from? I'm trying to skip the step of having to write the variables to a .csv file, as the values to be written are already known inside the macro (Cells(r, 6) should be written into the merge field "ClientName" of the merge doc merge.doc).
The code below does not work, but might give some of you gurus an idea of what I mean:
Set appWd = CreateObject("Word.Application")
appWd.documents.open Filename:="c:\merge.doc"
destination.fields."ClientName" = Cells(r, 6)
Thanks for your help!
The code below does not work, but might give some of you gurus an idea of what I mean:
Set appWd = CreateObject("Word.Application")
appWd.documents.open Filename:="c:\merge.doc"
destination.fields."ClientName" = Cells(r, 6)
Thanks for your help!