
Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Many thanks
My that is a lot of work, much appraciated.
It works to the point that Main Text Char etc is converted to Normal. To the
point of the code of:
.Style = ActiveDocument.Styles(RegularName)
And the error "style name exists ..." occurs.
Any clues on how to fix this one?
Thanks
Mark
> Mark was telling us:
> Mark nous racontait que :
[quoted text clipped - 92 lines]
> changing the style, then reapplying the manual formatting. Very tedious
> and the macro would run very slowly, I think.
Jean-Guy Marcil - 27 Jan 2005 18:28 GMT
Mark was telling us:
Mark nous racontait que :
> Many thanks
>
[quoted text clipped - 6 lines]
>
> And the error "style name exists ..." occurs.
I am not sure I understand. This line of code cannot generate the error you
are seeing because it does not try to manipulate style names, but merely
formatting text with a given style. Of course the style exists, it has
to.... Otherwise we could not format the text with that style.
> Any clues on how to fix this one?
Not really. I ran the code several times in a test document without any
problems... Of course, your document is more complex than mine.... but
still, it should work.

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Hank Roberts (at the office) - 07 Mar 2005 20:29 GMT
I copied the macro and tested it on a fairly complex document, and got a
halt and error message at the line
> .Style = ActiveDocument.Styles(RegularName)
Doesn't the macro as written expect that my document already has a defined
style named either "RegularName" or "Main Text" -- should that line instead
say
> .Style = ActiveDocument.Styles(Normal)
at that point?
Written in haste, while trying to figure out something else entirely -- I'll
come back to bang on this when I have time, so I'm just confirming I see a
similar problem.
And adding my suspicion that I just haven't read carefully enough to
recognize something that I'm doing wrong here (grin).
> Many thanks
>
[quoted text clipped - 11 lines]
> Thanks
> Mark
> > Here is an alternative idea:
> >
[quoted text clipped - 69 lines]
> > changing the style, then reapplying the manual formatting. Very tedious
> > and the macro would run very slowly, I think.
Hank Roberts (at the office) - 07 Mar 2005 20:39 GMT
One other thought -- sometimes I can sneak around problems like this by
finding the target and replacing it with "font color green" -- finish that,
so you've done something unique to all your targets -- then go and run
through again and change whatever's green to your desired end result.
I have no idea why this works sometimes, when I can't get a direct
replacement to work -- but it does, consistently, pay off when nothing else
is working.
Of course, "your color may vary" -- or whatever other aspect you choose to
use as the interim state. Just has to be something Word is willing to do for
you.
> Many thanks
>
[quoted text clipped - 8 lines]
>
> Any clues on how to fix this one?
....
Mark - 25 Mar 2005 08:12 GMT
Thanks
Mark
> One other thought -- sometimes I can sneak around problems like this by
> finding the target and replacing it with "font color green" -- finish
[quoted text clipped - 26 lines]
>> Any clues on how to fix this one?
> ....