Paragraph text refers to more than one style

K

Katerina

i am working on a document that has been edited by several users. it appears
that microsoft word has created these character styles that are now embedded
in the document (not in the template). Every time i try to delete these
character styles i get the following message "Paragraph text refers to more
than one style".

Q1: How and why Microsoft Word creates what appears to be a character
style based on a paragraph style?
Q2: How can we avoid our templates getting confused with character and
paragraph styles.

Can you please help?
 
S

Suzanne S. Barnhill

Word applies a paragraph style as a character style if you have part of a
paragraph selected when you apply the style. To avoid this, be careful to
either select the entire paragraph or none of it (insertion point is between
two characters).
 
K

Katerina

I understand all that - but in some instances you just need to highlight some
sentences not the entire paragraph. So how can i avoid my template getting
confused with char and para styles?

All my built-in styles have been modified by Word, even though they are all
based on NO-Style. So how can i stop it affecting my styles.

Please advise
 
T

TF

Tools, Options, Edit tab and deselect Keep Track of Formatting.



:I understand all that - but in some instances you just need to highlight
some
: sentences not the entire paragraph. So how can i avoid my template getting
: confused with char and para styles?
:
: All my built-in styles have been modified by Word, even though they are
all
: based on NO-Style. So how can i stop it affecting my styles.
:
: Please advise
:
: "Suzanne S. Barnhill" wrote:
:
: > Word applies a paragraph style as a character style if you have part of
a
: > paragraph selected when you apply the style. To avoid this, be careful
to
: > either select the entire paragraph or none of it (insertion point is
between
: > two characters).
: >
: > --
: > Suzanne S. Barnhill
: > Microsoft MVP (Word)
: > Words into Type
: > Fairhope, Alabama USA
:
: > Email cannot be acknowledged; please post all follow-ups to the
newsgroup so
: > all may benefit.
: >
: > : > > i am working on a document that has been edited by several users. it
: > appears
: > > that microsoft word has created these character styles that are now
: > embedded
: > > in the document (not in the template). Every time i try to delete
these
: > > character styles i get the following message "Paragraph text refers to
: > more
: > > than one style".
: > >
: > > Q1: How and why Microsoft Word creates what appears to be a
character
: > > style based on a paragraph style?
: > > Q2: How can we avoid our templates getting confused with character
and
: > > paragraph styles.
: > >
: > > Can you please help?
: >
: >
 
K

Katerina

Hello again,

the document/template has unchecked the:
1. Track of Formatting
2. The automatic update of styles
3. All styles are based on No Style

So all of the basic rules are adhered to. My question is why the problem
keeps re-occuring?

Why do i get this error message? in what instances do you get this message
and how can you deal with it?

Please advise
 
T

TF

Katerina

I think you have done just about all you can - until the next version of
Office!

Terry

: Hello again,
:
: the document/template has unchecked the:
: 1. Track of Formatting
: 2. The automatic update of styles
: 3. All styles are based on No Style
:
: So all of the basic rules are adhered to. My question is why the problem
: keeps re-occuring?
:
: Why do i get this error message? in what instances do you get this message
: and how can you deal with it?
:
: Please advise
:
: "TF" wrote:
:
: > Tools, Options, Edit tab and deselect Keep Track of Formatting.
: >
: > --
: > Terry Farrell - Word MVP
:
: >
: > : > :I understand all that - but in some instances you just need to
highlight
: > some
: > : sentences not the entire paragraph. So how can i avoid my template
getting
: > : confused with char and para styles?
: > :
: > : All my built-in styles have been modified by Word, even though they
are
: > all
: > : based on NO-Style. So how can i stop it affecting my styles.
: > :
: > : Please advise
: > :
: > : "Suzanne S. Barnhill" wrote:
: > :
: > : > Word applies a paragraph style as a character style if you have part
of
: > a
: > : > paragraph selected when you apply the style. To avoid this, be
careful
: > to
: > : > either select the entire paragraph or none of it (insertion point is
: > between
: > : > two characters).
: > : >
: > : > --
: > : > Suzanne S. Barnhill
: > : > Microsoft MVP (Word)
: > : > Words into Type
: > : > Fairhope, Alabama USA
: > :
: > : > Email cannot be acknowledged; please post all follow-ups to the
: > newsgroup so
: > : > all may benefit.
: > : >
: > : > : > : > > i am working on a document that has been edited by several users.
it
: > : > appears
: > : > > that microsoft word has created these character styles that are
now
: > : > embedded
: > : > > in the document (not in the template). Every time i try to delete
: > these
: > : > > character styles i get the following message "Paragraph text
refers to
: > : > more
: > : > > than one style".
: > : > >
: > : > > Q1: How and why Microsoft Word creates what appears to be a
: > character
: > : > > style based on a paragraph style?
: > : > > Q2: How can we avoid our templates getting confused with
character
: > and
: > : > > paragraph styles.
: > : > >
: > : > > Can you please help?
: > : >
: > : >
: >
: >
: >
 
S

Suzanne S. Barnhill

If you are highlighting just part of a paragraph to apply formatting, then
you should not (at least not unintentionally) be applying a paragraph style.
You can apply direct font formatting or a character style, but if you apply
a paragraph style, it will be applied as a de facto character style.
 
K

Klaus Linke

Hi Katerina,

One of the big problem with those link styles (char styles) is that you can't see them in the list of styles.
Another problem is that simply deleting them while they are still linked to a paragraph style will set the paragraphs in that paragraph style to "Normal", which will mess up your formatting.

To get back some control, you can get rid of all links between styles with the macro below.
It'll turn the char styles into regular (character) styles which you can see in the "styles and formatting" task pane.

The same used to happen when users saved the doc in Word2000. All those char styles were there anyway ... Saving in Word 2000 just showed Word2003 users the mess.

Once you can see them, you can get rid of them (replace them by the proper formatting, delete them).

Regards,
Klaus


Dim myStyle As Style
For Each myStyle In ActiveDocument.Styles
If myStyle.LinkStyle <> _
ActiveDocument.Styles(wdStyleNormal) Then
MsgBox myStyle.LinkStyle
myStyle.LinkStyle = _
ActiveDocument.Styles(wdStyleNormal)
End If
Next myStyle
 
K

Klaus Linke

I've honed the macro a bit, so it doesn't report as much clutter, handles alias style names, and renames the character styles so Word2003 doesn't hide them any more.
It would probably be safe to delete the (ex-) Char Styles at that point .... Just remove the hyphen in front of the line
ActiveDocument.Styles(myStyleName).Delete

Regards,
Klaus



Sub ChangeLinkStylesToRegularCharStyles()
' Can be used to get rid of Char styles, too
Dim myStyle As Style
Dim strMsg As String
Dim myStyleName As String
For Each myStyle In ActiveDocument.Styles
myStyleName = myStyle.NameLocal
If InStr(1, myStyle.NameLocal, ";") > 0 Then
myStyleName = left(myStyleName, InStr(1, myStyle.NameLocal, ";"))
End If
If myStyle.Type = wdStyleTypeCharacter Then
If myStyle.LinkStyle <> _
ActiveDocument.Styles(wdStyleNormal) Then
If myStyle.LinkStyle <> "" Then
If ActiveDocument.Styles(myStyle.LinkStyle).LinkStyle = _
myStyle Then
strMsg = strMsg & myStyle & " & " & _
myStyle.LinkStyle & vbCr
ActiveDocument.Styles(myStyle.LinkStyle).LinkStyle = _
ActiveDocument.Styles(wdStyleNormal)
myStyle.NameLocal = Replace(myStyle.NameLocal, "Char", "character")
' ActiveDocument.Styles(myStyleName).Delete
End If
End If
End If
End If
Next myStyle
MsgBox strMsg, , "Removed links:"

End Sub
 
K

Klaus Linke

It would probably be safe to delete the (ex-) Char Styles at that point ...

It's not. With style alias names, you risk deleting the paragraph style, not the formerly linked character style (a bug), and char styles for built-in styles can't be deleted (another bug).

I've tried to fix the issues, but gave up after the macro reached a hundred lines of code, and repeatedly crashed Word.

:-( Klaus
 

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