Hello.
I have this script to VBA Excel and in place of Prénom candidat I want to have the values of the cells in Column A and then replace with the values of correspondent column B. It need to have " " because it's a mergefield
I have this script to VBA Excel and in place of Prénom candidat I want to have the values of the cells in Column A and then replace with the values of correspondent column B. It need to have " " because it's a mergefield
VBA Code:
Dim Fld As Word.Field
With wdDoc
Set Fld = GetField(wdDoc, "Prénom candidat")
If Not Fld Is Nothing Then
Fld.Select
.Application.Selection.Delete
.Application.Selection.Text = xlWkbk.Sheets(1).Range("B1").Value
.Application.Selection.Collapse wdCollapseEnd
End If
End With