Hi Dudes
Does anyone have any experience using the Word Find Object and Execute method with the ReplaceWith parameter?
I get an error when strList is around 280 characters long, but not around 220 characters.
I suspect a limit to the size of the replacewith parameter to probably 255 characters.
The string does include several Char(13) or Char(10) (cant remember) which is used for a line break to make the string look like a list. I can't see that as a problem as it work for short lists but not for a very long list.
My solution is a bit clutzy. Check for length, cut string in two and use two List placeholders like strList1 and StrList2
More details are here
Thanks for your help!
Zollo VBA Developer
![[thumbsup] [thumbsup] [thumbsup]](/data/assets/smilies/thumbsup.gif)
Does anyone have any experience using the Word Find Object and Execute method with the ReplaceWith parameter?
Code:
objRange.Find.Execute FindText:="List", Replacewith:=strList, Replace:=wdReplaceOne
I suspect a limit to the size of the replacewith parameter to probably 255 characters.
The string does include several Char(13) or Char(10) (cant remember) which is used for a line break to make the string look like a list. I can't see that as a problem as it work for short lists but not for a very long list.
My solution is a bit clutzy. Check for length, cut string in two and use two List placeholders like strList1 and StrList2
More details are here
Thanks for your help!
Zollo VBA Developer
![[thumbsup] [thumbsup] [thumbsup]](/data/assets/smilies/thumbsup.gif)