This is what I have so far - but am getting the "string parameter too long" error
Dim xl As Excel.Application
Dim wkbk As Excel.Workbook
Dim wk As Excel.Worksheet
Set xl = CreateObject("Excel.Application")
Set wkbk = xl.Workbooks.Open("C:\Users\..............xlsx")
Set wk = wkbk.Sheets(1)
Dim placeholder() As String
Dim prompt() As String
Dim i As Integer
bb = wk.Range("E2").Value
ReDim num_identifiers(1 To bb)
ReDim placeholder(1 To bb)
ReDim prompt(1 To bb)
For i = 1 To bb
placeholder(i) = wk.Cells(2 + i, 1)
prompt(i) = wk.Cells(2 + i, 2)
With Selection.Find
.Text = placeholder(i)
.Replacement.ClearFormatting
.Replacement.Text = prompt(i)
.Execute Replace:=wdReplaceAll, Forward:=True, _
Wrap:=wdFindContinue
End With
Next i
Workbooks.Close
End Sub
Bookmarks