rakesh seebaruth
Active Member
- Joined
- Oct 6, 2011
- Messages
- 303
Hi Guys
I have the following vba
With Sheets("security")
LastRow = .Range("E9999").End(xlUp).Row 'Determine Last Row in Table
For CustRow = 8 To LastRow
For CustCol = 5 To 5 'Move Through 9 Columns
TagName = .Cells(7, CustCol).Value 'Tag Name
TagValue = .Cells(CustRow, CustCol).Value 'Tag Value
With objDoc.Content.Find
.Text = TagName
.Replacement.Text = TagValue
.Wrap = wdFindContinue
.Execute Replace:=wdReplaceAll 'Find & Replace all instances
End With
Next CustCol
Next CustRow
End With
The above vba codes work perfectly well with string less than 255 characters
In column 5 my text is about 320 characters leading to "Run Time Error-String Parameter too long"
Any solution to the above .
Your help will be highly appreciated.
Thanks and Regards
Rakesh
I have the following vba
With Sheets("security")
LastRow = .Range("E9999").End(xlUp).Row 'Determine Last Row in Table
For CustRow = 8 To LastRow
For CustCol = 5 To 5 'Move Through 9 Columns
TagName = .Cells(7, CustCol).Value 'Tag Name
TagValue = .Cells(CustRow, CustCol).Value 'Tag Value
With objDoc.Content.Find
.Text = TagName
.Replacement.Text = TagValue
.Wrap = wdFindContinue
.Execute Replace:=wdReplaceAll 'Find & Replace all instances
End With
Next CustCol
Next CustRow
End With
The above vba codes work perfectly well with string less than 255 characters
In column 5 my text is about 320 characters leading to "Run Time Error-String Parameter too long"
Any solution to the above .
Your help will be highly appreciated.
Thanks and Regards
Rakesh