![]() |
office automation Word-Excel
I call this code and always fails with Error number: - 2147023113 VBA Project Execute Method Failed. I don't know why it fails. Anybody
wdNew.Content.Selec For col = 1 To With wdApp.Selection.Fin fcontent = exSheet.Cells(rec, col).Valu .Execute FindText:=sfield(c), ReplaceWith:=fcontent, Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinu End Wit Nex |
office automation Word-Excel
pggardener
Just a guess: How is sfield dimmed, as an array? Has the variable 'c' been initialized? -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "pggardner" wrote in message ... I call this code and always fails with Error number: - 2147023113 VBA Project Execute Method Failed. I don't know why it fails. Anybody? wdNew.Content.Select For col = 1 To 5 With wdApp.Selection.Find fcontent = exSheet.Cells(rec, col).Value .Execute FindText:=sfield(c), ReplaceWith:=fcontent, _ Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue End With Next |
office automation Word-Excel
sfield is actually define this way
Dim sfield(0 To 4) As String |
All times are GMT +1. The time now is 05:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com