View Single Post
 
Old 12-22-2015, 02:18 AM
jc491's Avatar
jc491 jc491 is offline Windows 10 Office 2016
VBA Novice
 
Join Date: Sep 2015
Location: UK
Posts: 55
jc491 is on a distinguished road
Default

Hi Paul,

hope you are doing great!

thank you so much for helping again.

I get this error

Error 5834

.Replacement.Style = Split(StrSty, ",")(i)

After I stop the debug, then it inserts the placeholders for style strong, but nothing for heading 1.

In the second set of documents I was going to remove all the #hash identifiers, so we wouldn't even need to search for the #identifiers second time round - if that's easier.



.Text = "#" & Split(StrFnd, ",")(i) & "[A-Za-z]@>"
.Replacement.Style = Split(StrSty, ",")(i)


So it would be Simply find the styles and insert before and after.

StrStyleFind = " Strong,Heading 1,Character Style 1,Italic,Character Style 2"
StrStyleRep = "Placeholder1^& Placeholder2,^&,^&,Placeholder3^& Placeholder4,^&"

would that work?

thank you

J
Reply With Quote