Word 2007 problem with Find and Styles

N

Neil Cumfer

Is this a Word 2007 error, or a feature?

I start a blank new Word 2007 document based on the Normal template

I type a word, select it, apply the style Heading 1, and deselect it

I bring up the Find dialog box

I click on (More), Format, Style and select the built-in style 'Article
/ Section' (it is the 49th style in the list)

When I click on the OK button in the Find Style window, I notice that
the text in my document has changed.

When I click on the Cancel button in the Find and Replace window, the
dialog box closes but the text in my document does not revert to the
text that was there before opening the dialog box

If I click on the Find button before closing the dialog box, the format
will be remembered, so the next time I merely open the Find dialog box,
it could change the text of the document in the document window.

Is it too much to ask that Microsoft does not change the text of your
document when you are using the Find and Replace dialog box unless you
click on a Replace button?
 
S

Stefan Blom

The problem is with the built-in Article / Section list style which is
linked to the built-in headings. When you choose it as the style for "Find
what," it is incorrectly applied to text, causing the headings to reformat.

I'd definitely call it a bug; it certainly isn't a feature.

However, it may help if you explain what you are trying to accomplish.
Normally, one wouldn't try to find the Article / Section style (or any style
for that matter) unless it has already been applied to text.
 
B

Bob Buckland ?:-\)

Hi Stefan,

FWIW, similar behavior also occurs in Word 2000 and 2003 (although it can take a bit of 'luck' to create it in Word 2000. (In Word
2000 the List styles don't appear in Find=>Styles dialog ordinarily, but the behavior does show it in the undo list 'Bullet and
Numbering' (action) when it happens.)

In Word 2003 and 2007 (where List styles appear in
Format=>Styles and Formatting (or Styles pane) and in Find=>Styles; when the behavior occurs it does not have its own undo action
for Bullet and numbering.


If I follow these steps
1. Start new Blank document.
2. Open the Styles pane from Home=>Styles=>Launch
3. Apply Heading 1 Quick Style
4. Use Ctrl+F to open find dialog
5. Format=>Styles & Select List/number style
6. Click [Cancel] in the Find dialog.

The result I get is that there are two paragraph marks shown on the blank line of the document. Clicking between them causes the
the ListNum field content (Alt+F9 doesn't display the field) of the Article/Section list style to appear (still nothing in the undor
list). It also adds a 'numbering' part in the .docX file.

The Numbering will also appear in the blank document with the steps above if for step 6 you click into the document with the find
dialog open rather than Cancel.

If you have the Styles pane open with the above, the Heading 1 listing changes to show the applied numbering when you click [OK] in
step 5 (along with the definition when you hover over it in the styles pane).

Seems as though the Find dialog is pulling back the curtain and showing the wizard manipulating the smoke and mirrors <g>.

===========
The problem is with the built-in Article / Section list style which is
linked to the built-in headings. When you choose it as the style for "Find
what," it is incorrectly applied to text, causing the headings to reformat.

I'd definitely call it a bug; it certainly isn't a feature.

However, it may help if you explain what you are trying to accomplish.
Normally, one wouldn't try to find the Article / Section style (or any style
for that matter) unless it has already been applied to text.

--
Stefan Blom
Microsoft Word MVP >>
--

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*
 
N

Neil Cumfer

Hi Stefan, thanks for the reply

I am trying to find out which styles have been applied to the text (in
VBA).
The .InUse property doesn't seem to be reliable, there are lots of false
positives.
So I am doing a Find operation on each style in the collection to see if
it finds
anything. Maybe there is a better way?

Ultimately, I would like to reformat the styled text as unstyled but
apply the
style's formatting to it manually.

Neil
 
N

Neil Cumfer

Hi Bob,

well it appears this problem has been brewing for several versions!
I didn't realize it was so deep-rooted.

Thanks for the information.

Neil

Bob Buckland ?:-) said:
Hi Stefan,

FWIW, similar behavior also occurs in Word 2000 and 2003 (although it
can take a bit of 'luck' to create it in Word 2000. (In Word
2000 the List styles don't appear in Find=>Styles dialog ordinarily,
but the behavior does show it in the undo list 'Bullet and
Numbering' (action) when it happens.)

In Word 2003 and 2007 (where List styles appear in
Format=>Styles and Formatting (or Styles pane) and in Find=>Styles;
when the behavior occurs it does not have its own undo action
for Bullet and numbering.


If I follow these steps
1. Start new Blank document.
2. Open the Styles pane from Home=>Styles=>Launch
3. Apply Heading 1 Quick Style
4. Use Ctrl+F to open find dialog
5. Format=>Styles & Select List/number style
6. Click [Cancel] in the Find dialog.

The result I get is that there are two paragraph marks shown on the
blank line of the document. Clicking between them causes the
the ListNum field content (Alt+F9 doesn't display the field) of the
Article/Section list style to appear (still nothing in the undor
list). It also adds a 'numbering' part in the .docX file.

The Numbering will also appear in the blank document with the steps
above if for step 6 you click into the document with the find
dialog open rather than Cancel.

If you have the Styles pane open with the above, the Heading 1 listing
changes to show the applied numbering when you click [OK] in
 
S

Stefan Blom

Bob,

Thank you for the additional observations.

Note that instead of clicking (after step 6), you can press Ctrl+Q or
PageDown followed by PageUp to get the outline number to appear.

Actually, a user reported (a few months back, I believe) another way to get
a similar issue:

1. Create a blank document.

2. Apply Heading 1 to the empty paragraph.

3. Open the Manage Styles dialog box, for example by clicking the Manage
Styles button in the Styles pane (which can be displayed by pressing
Ctrl+Alt+Shift+S).

4. On the Edit tab, select the Article / Section style.

5. Click Cancel to close the dialog box.

6. In the document, you'll notice that the Heading 1 paragraph is formatted
as Article I, that is, the Article / Section list style has been applied,
reformatting the headings. You may have to press Ctrl+Q to see the
number formatting.

I'm wondering if this strange behavior depends on the fact that Article /
Section is a built-in list style. It seems as if, when you try to "access"
it (by simply selecting it in a dialog box!), it will be created in the
document, causing the associated paragraph styles (the built-in headings in
this case) to reformat.

--
Stefan Blom
Microsoft Word MVP


Bob Buckland ?:-) said:
Hi Stefan,

FWIW, similar behavior also occurs in Word 2000 and 2003 (although it can
take a bit of 'luck' to create it in Word 2000. (In Word
2000 the List styles don't appear in Find=>Styles dialog ordinarily, but
the behavior does show it in the undo list 'Bullet and
Numbering' (action) when it happens.)

In Word 2003 and 2007 (where List styles appear in
Format=>Styles and Formatting (or Styles pane) and in Find=>Styles; when
the behavior occurs it does not have its own undo action
for Bullet and numbering.


If I follow these steps
1. Start new Blank document.
2. Open the Styles pane from Home=>Styles=>Launch
3. Apply Heading 1 Quick Style
4. Use Ctrl+F to open find dialog
5. Format=>Styles & Select List/number style
6. Click [Cancel] in the Find dialog.

The result I get is that there are two paragraph marks shown on the blank
line of the document. Clicking between them causes the
the ListNum field content (Alt+F9 doesn't display the field) of the
Article/Section list style to appear (still nothing in the undor
list). It also adds a 'numbering' part in the .docX file.

The Numbering will also appear in the blank document with the steps above
if for step 6 you click into the document with the find
dialog open rather than Cancel.

If you have the Styles pane open with the above, the Heading 1 listing
changes to show the applied numbering when you click [OK] in
step 5 (along with the definition when you hover over it in the styles
pane).

Seems as though the Find dialog is pulling back the curtain and showing
the wizard manipulating the smoke and mirrors <g>.

===========
The problem is with the built-in Article / Section list style which is
linked to the built-in headings. When you choose it as the style for "Find
what," it is incorrectly applied to text, causing the headings to
reformat.

I'd definitely call it a bug; it certainly isn't a feature.

However, it may help if you explain what you are trying to accomplish.
Normally, one wouldn't try to find the Article / Section style (or any
style
for that matter) unless it has already been applied to text.

--
Stefan Blom
Microsoft Word MVP >>
--

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*
 
S

Stefan Blom

Hmm, I realize that my remark was a little unclear. Obviously there are
situations when you are looking for a style because you don't know if it has
been applied to text (for example, in a large document with many editors). I
guess I was assuming
 
S

Stefan Blom

Oops, I clicked the Send button too quickly... :)

My initial assumption was that you were simply trying to replace a single
style with another.

If you want to find out which styles have been used in a document, you can
try the macro here: http://gregmaxey.mvps.org/Style_Report.htm.

Replacing styles with direct formatting would definitely require a macro,
but it would be better to ask for assistance in the
microsoft.public.word.vba.general group, where you are more likely to get
knowledgeable help. I'm guessing you will also get the question "Why are you
trying to do that?" when/if you post a message in that group. :)
 
N

Neil Cumfer

I'm guessing you will also get the question "Why are you
trying to do that?" when/if you post a message in that group. :)

LOL ... I bet you are right

Mainly I just wanted to gripe about Microsoft, and also get confirmation
that the problem is real

Thanks for the link ... the macro there seems to be very thorough

Neil
 

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