Duplicate Built-in Style Names

A

Alisa Limvere

This isn't a question - I was able to figure a fix for
it. But I thought it was interesting enough to report.

I am converting existing Word documents into a different
format that predefined styles. One of my styles is Code,
a paragraph style.

It turned out that the previous text, which I was copying
and pasting, had a paragraph style named Code Char. When
I pasted it into my quarantine doc that was created from
my template, I now had the styles Code, Code Char, and
Code Char Char. Code Char was shown as a paragraph style.
Code Char Char was shown as the character style for Code
Char.

Unfortunately, Code Char is also supposed to be the built-
in character style name for the character formatting for
my paragraph style Code (see the conflict?). When I
deleted the undesired paragraph style Code Char in the
Format-Style dialog, my paragraph style Code was deleted
and the old (incorrect) Code Char paragraph style
remained. Code Char Char was not touched.

It didn't matter if I created a new document, deleted
Code Char Char, or whatever. I tried going through the
Organizer screen. I also tried searching and replacing
the Code Char paragraph style in the old text before I
copied, but it would "magically" reappear as a new
paragraph style in my quarantine doc. I tried to search
and replace the Code Char paragraph style with my Code
paragraph style, but that didn't work.

The fix - *before* I pasted the old content, I renamed
the Code Char paragraph style (specifically,
to "Stupid"). I pasted the content into my quarantine
doc. Stupid and Stupid Char appeared in my style list.
Then, I could search and replace the Stupid style with my
Code paragraph style. Afterwards, I deleted the Stupid
and Stupid Char styles without affecting any other styles.

Basically, the end result - Don't use "Char" as the last
part of a paragraph style name. This helps prevent
potential conflict with automatic character styles that
have "Char" appended to the paragraph style names.

I hope this is interesting to someone out there.

Keep up the good work!

Alisa
 
M

Margaret Aldis

Hi Alisa

Well I found it interesting <g>.

Did the previous text intentionally use a paragraph style called 'Code
char', or was its existence the result of Word creating one of its ... char
stylename aliases?

I've been trying to catch Word at it, but I think copy and paste may
generate extra char chars even when the pasted text appears to be clean and
not use paragraph-as-character style formatting.
 
A

Alisa Limvere

I inherited the file from a previous tech writer at my
new job.

My impression is that she deliberately created a
paragraph style with a name ending in "Char" (in this
case, "Code Char"). Then, when I copied their content
into a file that had my paragraph style "Code" defined,
the conflict began.

If you select just a range of text within a paragraph and
apply a paragraph style, Word automatically creates a
character style based on the paragraph style name. It
appends "Char" to the paragraph style name to get the
character style name.

Thus, at some point, there was a range of text in my
document to which I had selected and applied the "Code"
paragraph style. I think Word tried to create the
automatic character style, saw that there was a style
with that name, and stopped, but then created the link
between two styles - my paragraph style "Code" and the
old paragraph style "Code Char."

It seemed Word was confused about a paragraph style *and*
a character style with the same name (in this case, "Code
Char").

It was only when I renamed the original "Code Char"
paragraph style to something else in the original file
before I copied it into my file, that Word did not create
a link and conflict with my paragraph style "Code".

Clear as mud, eh?

Alisa
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top