Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain formatparameters
I posted this in another thread, but the thread title dealt with a
larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
In this case the indent is set in the Bullets (Numbering) dialog rather than
Paragraph, so perhaps you should try that instead. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Paul" wrote in message ... I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Paul" wrote in message ... I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain formatparameters
I put the cursor in one of the pasted bullet paragraphs. I invoked
Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36*pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. *From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. *Word did not find any of the paragraphs conforming to these attributes, even though they exist. *Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain formatparameters
I put the cursor in one of the pasted bullet paragraphs. I invoked
Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36*pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. *From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. *Word did not find any of the paragraphs conforming to these attributes, even though they exist. *Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
In Word 97-2003, you must always use the Customize Outline Numbered List dialog
box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. See http://www.shaunakelly.com/word/numb...Numbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
In Word 97-2003, you must always use the Customize Outline Numbered List dialog
box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. See http://www.shaunakelly.com/word/numb...Numbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain formatparameters
Stefan,
The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06*pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. *I invoked Format-BulletsAndNumbering-Customize. *All the numerical positioning parameters are zero: ** BulletPosition-IndentAt ** TextPosition-TabSpaceAfter ** TextPosition-IndentAt That's odd, I thought. *So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. *According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#9
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain formatparameters
Stefan,
The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06*pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. *I invoked Format-BulletsAndNumbering-Customize. *All the numerical positioning parameters are zero: ** BulletPosition-IndentAt ** TextPosition-TabSpaceAfter ** TextPosition-IndentAt That's odd, I thought. *So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. *According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#10
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
Paul,
You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#11
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
Paul,
You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#12
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
The problem here is that the multilevel bullets have already been applied,
presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#13
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
The problem here is that the multilevel bullets have already been applied,
presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#14
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
My point was that, as far as I know, there is no way in the user interface to do
what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#15
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
My point was that, as far as I know, there is no way in the user interface to do
what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#16
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
Well, my point was that apparently it can't be done through the UI, either.
I merely contend that it *should* be possible. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#17
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
Well, my point was that apparently it can't be done through the UI, either.
I merely contend that it *should* be possible. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#18
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
Even working with vba seems problematical, as the levels associated with the
bullets do not seem to be accessible. However the following macro *may* help. Put the cursor in one of the bulleted paragraphs in question and all paragraphs that have the same indent will be formatted with the heading style number ( 1 - 9) entered into the dialog. The original bullet will be removed and will only be re-applied if the chosen heading style is bulleted. The only snag that immediately comes to mind is that there may be unbulleted paragraphs with the same left indent Sub AddHeadingStyle() Dim iIndent As Long Dim iStyle As String Dim oPara As Paragraph Start: On Error Resume Next iStyle = InputBox("Enter Heading Style number 1-9") If iStyle = "" Then Exit Sub iIndent = Selection.Paragraphs(1).LeftIndent For Each oPara In ActiveDocument.Paragraphs If oPara.LeftIndent = iIndent Then oPara.Style = "Heading " & iStyle End If Next oPara End Sub http://www.gmayor.com/installing_macro.htm I would recommend testing it on a copy of the document. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#19
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
Even working with vba seems problematical, as the levels associated with the
bullets do not seem to be accessible. However the following macro *may* help. Put the cursor in one of the bulleted paragraphs in question and all paragraphs that have the same indent will be formatted with the heading style number ( 1 - 9) entered into the dialog. The original bullet will be removed and will only be re-applied if the chosen heading style is bulleted. The only snag that immediately comes to mind is that there may be unbulleted paragraphs with the same left indent Sub AddHeadingStyle() Dim iIndent As Long Dim iStyle As String Dim oPara As Paragraph Start: On Error Resume Next iStyle = InputBox("Enter Heading Style number 1-9") If iStyle = "" Then Exit Sub iIndent = Selection.Paragraphs(1).LeftIndent For Each oPara In ActiveDocument.Paragraphs If oPara.LeftIndent = iIndent Then oPara.Style = "Heading " & iStyle End If Next oPara End Sub http://www.gmayor.com/installing_macro.htm I would recommend testing it on a copy of the document. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#20
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
If it were possible, that would simplify things, of course. :-)
-- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... Well, my point was that apparently it can't be done through the UI, either. I merely contend that it *should* be possible. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#21
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
If it were possible, that would simplify things, of course. :-)
-- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... Well, my point was that apparently it can't be done through the UI, either. I merely contend that it *should* be possible. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#22
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
Wouldn't testing for
ParagraphObject.Range.ListFormat.ListLevelNumb er work? Even if this works, it won't be 100% reliabe, I guess. A document may contain several different lists. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Graham Mayor" wrote in message ... Even working with vba seems problematical, as the levels associated with the bullets do not seem to be accessible. However the following macro *may* help. Put the cursor in one of the bulleted paragraphs in question and all paragraphs that have the same indent will be formatted with the heading style number ( 1 - 9) entered into the dialog. The original bullet will be removed and will only be re-applied if the chosen heading style is bulleted. The only snag that immediately comes to mind is that there may be unbulleted paragraphs with the same left indent Sub AddHeadingStyle() Dim iIndent As Long Dim iStyle As String Dim oPara As Paragraph Start: On Error Resume Next iStyle = InputBox("Enter Heading Style number 1-9") If iStyle = "" Then Exit Sub iIndent = Selection.Paragraphs(1).LeftIndent For Each oPara In ActiveDocument.Paragraphs If oPara.LeftIndent = iIndent Then oPara.Style = "Heading " & iStyle End If Next oPara End Sub http://www.gmayor.com/installing_macro.htm I would recommend testing it on a copy of the document. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#23
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
Wouldn't testing for ParagraphObject.Range.ListFormat.ListLevelNumb er work? Even if this works, it won't be 100% reliabe, I guess. A document may contain several different lists. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Graham Mayor" wrote in message ... Even working with vba seems problematical, as the levels associated with the bullets do not seem to be accessible. However the following macro *may* help. Put the cursor in one of the bulleted paragraphs in question and all paragraphs that have the same indent will be formatted with the heading style number ( 1 - 9) entered into the dialog. The original bullet will be removed and will only be re-applied if the chosen heading style is bulleted. The only snag that immediately comes to mind is that there may be unbulleted paragraphs with the same left indent Sub AddHeadingStyle() Dim iIndent As Long Dim iStyle As String Dim oPara As Paragraph Start: On Error Resume Next iStyle = InputBox("Enter Heading Style number 1-9") If iStyle = "" Then Exit Sub iIndent = Selection.Paragraphs(1).LeftIndent For Each oPara In ActiveDocument.Paragraphs If oPara.LeftIndent = iIndent Then oPara.Style = "Heading " & iStyle End If Next oPara End Sub http://www.gmayor.com/installing_macro.htm I would recommend testing it on a copy of the document. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#24
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
It does work after a fashion - but the default body text would be at level 1
(rather than 0 as you might expect) You can test that premise with a macro containing the line MsgBox Selection.Range.Paragraphs(1).Range.ListFormat.Lis tLevelNumber .... so depending on which level you wanted to exploit you may not get the results you require, but higher levels should work - and yes it will affect all the lists, but I had assumed that was the plan i.e. to put some order into a document by using styles? Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber = 2 Then oPara.Style = "Heading 2" End If Next oPara or format all the levels except the first with the matching Heading styles Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber 1 Then oPara.Style = "Heading " & _ oPara.Range.ListFormat.ListLevelNumber End If Next oPara I still cannot think of an elegant way of differentiating the first level from the underlying text (though there may well be one) but the other macro I posted earlier would handle level 1 -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... Wouldn't testing for ParagraphObject.Range.ListFormat.ListLevelNumb er work? Even if this works, it won't be 100% reliabe, I guess. A document may contain several different lists. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Graham Mayor" wrote in message ... Even working with vba seems problematical, as the levels associated with the bullets do not seem to be accessible. However the following macro *may* help. Put the cursor in one of the bulleted paragraphs in question and all paragraphs that have the same indent will be formatted with the heading style number ( 1 - 9) entered into the dialog. The original bullet will be removed and will only be re-applied if the chosen heading style is bulleted. The only snag that immediately comes to mind is that there may be unbulleted paragraphs with the same left indent Sub AddHeadingStyle() Dim iIndent As Long Dim iStyle As String Dim oPara As Paragraph Start: On Error Resume Next iStyle = InputBox("Enter Heading Style number 1-9") If iStyle = "" Then Exit Sub iIndent = Selection.Paragraphs(1).LeftIndent For Each oPara In ActiveDocument.Paragraphs If oPara.LeftIndent = iIndent Then oPara.Style = "Heading " & iStyle End If Next oPara End Sub http://www.gmayor.com/installing_macro.htm I would recommend testing it on a copy of the document. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#25
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
It does work after a fashion - but the default body text would be at level 1
(rather than 0 as you might expect) You can test that premise with a macro containing the line MsgBox Selection.Range.Paragraphs(1).Range.ListFormat.Lis tLevelNumber .... so depending on which level you wanted to exploit you may not get the results you require, but higher levels should work - and yes it will affect all the lists, but I had assumed that was the plan i.e. to put some order into a document by using styles? Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber = 2 Then oPara.Style = "Heading 2" End If Next oPara or format all the levels except the first with the matching Heading styles Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber 1 Then oPara.Style = "Heading " & _ oPara.Range.ListFormat.ListLevelNumber End If Next oPara I still cannot think of an elegant way of differentiating the first level from the underlying text (though there may well be one) but the other macro I posted earlier would handle level 1 -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... Wouldn't testing for ParagraphObject.Range.ListFormat.ListLevelNumb er work? Even if this works, it won't be 100% reliabe, I guess. A document may contain several different lists. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Graham Mayor" wrote in message ... Even working with vba seems problematical, as the levels associated with the bullets do not seem to be accessible. However the following macro *may* help. Put the cursor in one of the bulleted paragraphs in question and all paragraphs that have the same indent will be formatted with the heading style number ( 1 - 9) entered into the dialog. The original bullet will be removed and will only be re-applied if the chosen heading style is bulleted. The only snag that immediately comes to mind is that there may be unbulleted paragraphs with the same left indent Sub AddHeadingStyle() Dim iIndent As Long Dim iStyle As String Dim oPara As Paragraph Start: On Error Resume Next iStyle = InputBox("Enter Heading Style number 1-9") If iStyle = "" Then Exit Sub iIndent = Selection.Paragraphs(1).LeftIndent For Each oPara In ActiveDocument.Paragraphs If oPara.LeftIndent = iIndent Then oPara.Style = "Heading " & iStyle End If Next oPara End Sub http://www.gmayor.com/installing_macro.htm I would recommend testing it on a copy of the document. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#26
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
Perhaps the workaround in the "List level" section of the article at
http://word.mvps.org/FAQs/Numbering/ListString.htm can still be used? -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Graham Mayor" wrote in message ... It does work after a fashion - but the default body text would be at level 1 (rather than 0 as you might expect) You can test that premise with a macro containing the line MsgBox Selection.Range.Paragraphs(1).Range.ListFormat.Lis tLevelNumber ... so depending on which level you wanted to exploit you may not get the results you require, but higher levels should work - and yes it will affect all the lists, but I had assumed that was the plan i.e. to put some order into a document by using styles? Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber = 2 Then oPara.Style = "Heading 2" End If Next oPara or format all the levels except the first with the matching Heading styles Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber 1 Then oPara.Style = "Heading " & _ oPara.Range.ListFormat.ListLevelNumber End If Next oPara I still cannot think of an elegant way of differentiating the first level from the underlying text (though there may well be one) but the other macro I posted earlier would handle level 1 -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... Wouldn't testing for ParagraphObject.Range.ListFormat.ListLevelNumb er work? Even if this works, it won't be 100% reliabe, I guess. A document may contain several different lists. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Graham Mayor" wrote in message ... Even working with vba seems problematical, as the levels associated with the bullets do not seem to be accessible. However the following macro *may* help. Put the cursor in one of the bulleted paragraphs in question and all paragraphs that have the same indent will be formatted with the heading style number ( 1 - 9) entered into the dialog. The original bullet will be removed and will only be re-applied if the chosen heading style is bulleted. The only snag that immediately comes to mind is that there may be unbulleted paragraphs with the same left indent Sub AddHeadingStyle() Dim iIndent As Long Dim iStyle As String Dim oPara As Paragraph Start: On Error Resume Next iStyle = InputBox("Enter Heading Style number 1-9") If iStyle = "" Then Exit Sub iIndent = Selection.Paragraphs(1).LeftIndent For Each oPara In ActiveDocument.Paragraphs If oPara.LeftIndent = iIndent Then oPara.Style = "Heading " & iStyle End If Next oPara End Sub http://www.gmayor.com/installing_macro.htm I would recommend testing it on a copy of the document. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#27
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
Perhaps the workaround in the "List level" section of the article at http://word.mvps.org/FAQs/Numbering/ListString.htm can still be used? -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Graham Mayor" wrote in message ... It does work after a fashion - but the default body text would be at level 1 (rather than 0 as you might expect) You can test that premise with a macro containing the line MsgBox Selection.Range.Paragraphs(1).Range.ListFormat.Lis tLevelNumber ... so depending on which level you wanted to exploit you may not get the results you require, but higher levels should work - and yes it will affect all the lists, but I had assumed that was the plan i.e. to put some order into a document by using styles? Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber = 2 Then oPara.Style = "Heading 2" End If Next oPara or format all the levels except the first with the matching Heading styles Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber 1 Then oPara.Style = "Heading " & _ oPara.Range.ListFormat.ListLevelNumber End If Next oPara I still cannot think of an elegant way of differentiating the first level from the underlying text (though there may well be one) but the other macro I posted earlier would handle level 1 -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... Wouldn't testing for ParagraphObject.Range.ListFormat.ListLevelNumb er work? Even if this works, it won't be 100% reliabe, I guess. A document may contain several different lists. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Graham Mayor" wrote in message ... Even working with vba seems problematical, as the levels associated with the bullets do not seem to be accessible. However the following macro *may* help. Put the cursor in one of the bulleted paragraphs in question and all paragraphs that have the same indent will be formatted with the heading style number ( 1 - 9) entered into the dialog. The original bullet will be removed and will only be re-applied if the chosen heading style is bulleted. The only snag that immediately comes to mind is that there may be unbulleted paragraphs with the same left indent Sub AddHeadingStyle() Dim iIndent As Long Dim iStyle As String Dim oPara As Paragraph Start: On Error Resume Next iStyle = InputBox("Enter Heading Style number 1-9") If iStyle = "" Then Exit Sub iIndent = Selection.Paragraphs(1).LeftIndent For Each oPara In ActiveDocument.Paragraphs If oPara.LeftIndent = iIndent Then oPara.Style = "Heading " & iStyle End If Next oPara End Sub http://www.gmayor.com/installing_macro.htm I would recommend testing it on a copy of the document. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#28
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
OK - found it
Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListType = 4 Then oPara.Style = "Heading " & _ oPara.Range.ListFormat.ListLevelNumber End If Next oPara will format all the levels with their appropriate Heading style -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Graham Mayor" wrote in message ... It does work after a fashion - but the default body text would be at level 1 (rather than 0 as you might expect) You can test that premise with a macro containing the line MsgBox Selection.Range.Paragraphs(1).Range.ListFormat.Lis tLevelNumber ... so depending on which level you wanted to exploit you may not get the results you require, but higher levels should work - and yes it will affect all the lists, but I had assumed that was the plan i.e. to put some order into a document by using styles? Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber = 2 Then oPara.Style = "Heading 2" End If Next oPara or format all the levels except the first with the matching Heading styles Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber 1 Then oPara.Style = "Heading " & _ oPara.Range.ListFormat.ListLevelNumber End If Next oPara I still cannot think of an elegant way of differentiating the first level from the underlying text (though there may well be one) but the other macro I posted earlier would handle level 1 -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... Wouldn't testing for ParagraphObject.Range.ListFormat.ListLevelNumb er work? Even if this works, it won't be 100% reliabe, I guess. A document may contain several different lists. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Graham Mayor" wrote in message ... Even working with vba seems problematical, as the levels associated with the bullets do not seem to be accessible. However the following macro *may* help. Put the cursor in one of the bulleted paragraphs in question and all paragraphs that have the same indent will be formatted with the heading style number ( 1 - 9) entered into the dialog. The original bullet will be removed and will only be re-applied if the chosen heading style is bulleted. The only snag that immediately comes to mind is that there may be unbulleted paragraphs with the same left indent Sub AddHeadingStyle() Dim iIndent As Long Dim iStyle As String Dim oPara As Paragraph Start: On Error Resume Next iStyle = InputBox("Enter Heading Style number 1-9") If iStyle = "" Then Exit Sub iIndent = Selection.Paragraphs(1).LeftIndent For Each oPara In ActiveDocument.Paragraphs If oPara.LeftIndent = iIndent Then oPara.Style = "Heading " & iStyle End If Next oPara End Sub http://www.gmayor.com/installing_macro.htm I would recommend testing it on a copy of the document. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#29
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
OK - found it
Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListType = 4 Then oPara.Style = "Heading " & _ oPara.Range.ListFormat.ListLevelNumber End If Next oPara will format all the levels with their appropriate Heading style -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Graham Mayor" wrote in message ... It does work after a fashion - but the default body text would be at level 1 (rather than 0 as you might expect) You can test that premise with a macro containing the line MsgBox Selection.Range.Paragraphs(1).Range.ListFormat.Lis tLevelNumber ... so depending on which level you wanted to exploit you may not get the results you require, but higher levels should work - and yes it will affect all the lists, but I had assumed that was the plan i.e. to put some order into a document by using styles? Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber = 2 Then oPara.Style = "Heading 2" End If Next oPara or format all the levels except the first with the matching Heading styles Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber 1 Then oPara.Style = "Heading " & _ oPara.Range.ListFormat.ListLevelNumber End If Next oPara I still cannot think of an elegant way of differentiating the first level from the underlying text (though there may well be one) but the other macro I posted earlier would handle level 1 -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... Wouldn't testing for ParagraphObject.Range.ListFormat.ListLevelNumb er work? Even if this works, it won't be 100% reliabe, I guess. A document may contain several different lists. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Graham Mayor" wrote in message ... Even working with vba seems problematical, as the levels associated with the bullets do not seem to be accessible. However the following macro *may* help. Put the cursor in one of the bulleted paragraphs in question and all paragraphs that have the same indent will be formatted with the heading style number ( 1 - 9) entered into the dialog. The original bullet will be removed and will only be re-applied if the chosen heading style is bulleted. The only snag that immediately comes to mind is that there may be unbulleted paragraphs with the same left indent Sub AddHeadingStyle() Dim iIndent As Long Dim iStyle As String Dim oPara As Paragraph Start: On Error Resume Next iStyle = InputBox("Enter Heading Style number 1-9") If iStyle = "" Then Exit Sub iIndent = Selection.Paragraphs(1).LeftIndent For Each oPara In ActiveDocument.Paragraphs If oPara.LeftIndent = iIndent Then oPara.Style = "Heading " & iStyle End If Next oPara End Sub http://www.gmayor.com/installing_macro.htm I would recommend testing it on a copy of the document. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message ... The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#30
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain formatparameters
Suzanne, Stefan, Graham,
Thanks for your indepth replies...I wasn't expecting to experiment with VBA, which always takes a while for me to get oriented in, being not a VBA programmer. I will need to follow up when I have a window of breathing room (I ploughed through the multilevel bullets and manually turned them into different-level headings). This is something that I expect to do more than once, so I have no doubt that I will be following up with the coding examples at some point. On May 2, 9:34*am, "Graham Mayor" wrote: OK - found it Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs * * If oPara.Range.ListFormat.ListType = 4 Then * * * * oPara.Style = "Heading " & _ * * * * oPara.Range.ListFormat.ListLevelNumber * * End If Next oPara will format all the levels with their appropriate Heading style "Graham Mayor" wrote: It does work after a fashion - but the default body text would be at level 1 (rather than 0 as you might expect) You can test that premise with a macro containing the line MsgBox Selection.Range.Paragraphs(1).Range.ListFormat.Lis tLevelNumber ... so depending on which level you wanted to exploit you may not get the results you require, but higher levels should work - and yes it will affect all the lists, but I had assumed that was the plan i.e. to put some order into a document by using styles? Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs * *If oPara.Range.ListFormat.ListLevelNumber = 2 Then * * * *oPara.Style = "Heading 2" * *End If Next oPara or format all the levels except the first with the matching Heading styles Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs * *If oPara.Range.ListFormat.ListLevelNumber 1 Then * * * *oPara.Style = "Heading " & _ * * * *oPara.Range.ListFormat.ListLevelNumber * *End If Next oPara I still cannot think of an elegant way of differentiating the first level from the underlying text (though there may well be one) but the other macro I posted earlier would handle level 1 -- Graham Mayor - *Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org "Stefan Blom" wrote in message ... Wouldn't testing for ParagraphObject.Range.ListFormat.ListLevelNumb er work? Even if this works, it won't be 100% reliabe, I guess. A document may contain several different lists. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Graham Mayor" wrote in message ... Even working with vba seems problematical, as the levels associated with the bullets do not seem to be accessible. However the following macro *may* help. Put the cursor in one of the bulleted paragraphs in question and all paragraphs that have the same indent will be formatted with the heading style number ( 1 - 9) entered into the dialog. The original bullet will be removed and will only be re-applied if the chosen heading style is bulleted. The only snag that immediately comes to mind is that there may be unbulleted paragraphs with the same left indent Sub AddHeadingStyle() Dim iIndent As Long Dim iStyle As String Dim oPara As Paragraph Start: On Error Resume Next iStyle = InputBox("Enter Heading Style number 1-9") If iStyle = "" Then Exit Sub iIndent = Selection.Paragraphs(1).LeftIndent For Each oPara In ActiveDocument.Paragraphs * *If oPara.LeftIndent = iIndent Then * * * *oPara.Style = "Heading " & iStyle * *End If Next oPara End Sub http://www.gmayor.com/installing_macro.htm I would recommend testing it on a copy of the document. -- Graham Mayor - *Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message .. . The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message . .. Paul, You can set up multilevel/outline bullets via that same dialog box.. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. *I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. *Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#31
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain formatparameters
Suzanne, Stefan, Graham,
Thanks for your indepth replies...I wasn't expecting to experiment with VBA, which always takes a while for me to get oriented in, being not a VBA programmer. I will need to follow up when I have a window of breathing room (I ploughed through the multilevel bullets and manually turned them into different-level headings). This is something that I expect to do more than once, so I have no doubt that I will be following up with the coding examples at some point. On May 2, 9:34*am, "Graham Mayor" wrote: OK - found it Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs * * If oPara.Range.ListFormat.ListType = 4 Then * * * * oPara.Style = "Heading " & _ * * * * oPara.Range.ListFormat.ListLevelNumber * * End If Next oPara will format all the levels with their appropriate Heading style "Graham Mayor" wrote: It does work after a fashion - but the default body text would be at level 1 (rather than 0 as you might expect) You can test that premise with a macro containing the line MsgBox Selection.Range.Paragraphs(1).Range.ListFormat.Lis tLevelNumber ... so depending on which level you wanted to exploit you may not get the results you require, but higher levels should work - and yes it will affect all the lists, but I had assumed that was the plan i.e. to put some order into a document by using styles? Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs * *If oPara.Range.ListFormat.ListLevelNumber = 2 Then * * * *oPara.Style = "Heading 2" * *End If Next oPara or format all the levels except the first with the matching Heading styles Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs * *If oPara.Range.ListFormat.ListLevelNumber 1 Then * * * *oPara.Style = "Heading " & _ * * * *oPara.Range.ListFormat.ListLevelNumber * *End If Next oPara I still cannot think of an elegant way of differentiating the first level from the underlying text (though there may well be one) but the other macro I posted earlier would handle level 1 -- Graham Mayor - *Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org "Stefan Blom" wrote in message ... Wouldn't testing for ParagraphObject.Range.ListFormat.ListLevelNumb er work? Even if this works, it won't be 100% reliabe, I guess. A document may contain several different lists. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Graham Mayor" wrote in message ... Even working with vba seems problematical, as the levels associated with the bullets do not seem to be accessible. However the following macro *may* help. Put the cursor in one of the bulleted paragraphs in question and all paragraphs that have the same indent will be formatted with the heading style number ( 1 - 9) entered into the dialog. The original bullet will be removed and will only be re-applied if the chosen heading style is bulleted. The only snag that immediately comes to mind is that there may be unbulleted paragraphs with the same left indent Sub AddHeadingStyle() Dim iIndent As Long Dim iStyle As String Dim oPara As Paragraph Start: On Error Resume Next iStyle = InputBox("Enter Heading Style number 1-9") If iStyle = "" Then Exit Sub iIndent = Selection.Paragraphs(1).LeftIndent For Each oPara In ActiveDocument.Paragraphs * *If oPara.LeftIndent = iIndent Then * * * *oPara.Style = "Heading " & iStyle * *End If Next oPara End Sub http://www.gmayor.com/installing_macro.htm I would recommend testing it on a copy of the document. -- Graham Mayor - *Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message .. . The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message . .. Paul, You can set up multilevel/outline bullets via that same dialog box.. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. *I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. *Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#32
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
See http://www.gmayor.com/installing_macro.htm
The posted macro will work with multi-level bulleted (and numbered) lists -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Paul" wrote in message ... Suzanne, Stefan, Graham, Thanks for your indepth replies...I wasn't expecting to experiment with VBA, which always takes a while for me to get oriented in, being not a VBA programmer. I will need to follow up when I have a window of breathing room (I ploughed through the multilevel bullets and manually turned them into different-level headings). This is something that I expect to do more than once, so I have no doubt that I will be following up with the coding examples at some point. On May 2, 9:34 am, "Graham Mayor" wrote: OK - found it Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListType = 4 Then oPara.Style = "Heading " & _ oPara.Range.ListFormat.ListLevelNumber End If Next oPara will format all the levels with their appropriate Heading style "Graham Mayor" wrote: It does work after a fashion - but the default body text would be at level 1 (rather than 0 as you might expect) You can test that premise with a macro containing the line MsgBox Selection.Range.Paragraphs(1).Range.ListFormat.Lis tLevelNumber ... so depending on which level you wanted to exploit you may not get the results you require, but higher levels should work - and yes it will affect all the lists, but I had assumed that was the plan i.e. to put some order into a document by using styles? Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber = 2 Then oPara.Style = "Heading 2" End If Next oPara or format all the levels except the first with the matching Heading styles Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber 1 Then oPara.Style = "Heading " & _ oPara.Range.ListFormat.ListLevelNumber End If Next oPara I still cannot think of an elegant way of differentiating the first level from the underlying text (though there may well be one) but the other macro I posted earlier would handle level 1 -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org "Stefan Blom" wrote in message ... Wouldn't testing for ParagraphObject.Range.ListFormat.ListLevelNumb er work? Even if this works, it won't be 100% reliabe, I guess. A document may contain several different lists. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Graham Mayor" wrote in message ... Even working with vba seems problematical, as the levels associated with the bullets do not seem to be accessible. However the following macro *may* help. Put the cursor in one of the bulleted paragraphs in question and all paragraphs that have the same indent will be formatted with the heading style number ( 1 - 9) entered into the dialog. The original bullet will be removed and will only be re-applied if the chosen heading style is bulleted. The only snag that immediately comes to mind is that there may be unbulleted paragraphs with the same left indent Sub AddHeadingStyle() Dim iIndent As Long Dim iStyle As String Dim oPara As Paragraph Start: On Error Resume Next iStyle = InputBox("Enter Heading Style number 1-9") If iStyle = "" Then Exit Sub iIndent = Selection.Paragraphs(1).LeftIndent For Each oPara In ActiveDocument.Paragraphs If oPara.LeftIndent = iIndent Then oPara.Style = "Heading " & iStyle End If Next oPara End Sub http://www.gmayor.com/installing_macro.htm I would recommend testing it on a copy of the document. -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message .. . The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message . .. Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#33
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain format parameters
See http://www.gmayor.com/installing_macro.htm
The posted macro will work with multi-level bulleted (and numbered) lists -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Paul" wrote in message ... Suzanne, Stefan, Graham, Thanks for your indepth replies...I wasn't expecting to experiment with VBA, which always takes a while for me to get oriented in, being not a VBA programmer. I will need to follow up when I have a window of breathing room (I ploughed through the multilevel bullets and manually turned them into different-level headings). This is something that I expect to do more than once, so I have no doubt that I will be following up with the coding examples at some point. On May 2, 9:34 am, "Graham Mayor" wrote: OK - found it Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListType = 4 Then oPara.Style = "Heading " & _ oPara.Range.ListFormat.ListLevelNumber End If Next oPara will format all the levels with their appropriate Heading style "Graham Mayor" wrote: It does work after a fashion - but the default body text would be at level 1 (rather than 0 as you might expect) You can test that premise with a macro containing the line MsgBox Selection.Range.Paragraphs(1).Range.ListFormat.Lis tLevelNumber ... so depending on which level you wanted to exploit you may not get the results you require, but higher levels should work - and yes it will affect all the lists, but I had assumed that was the plan i.e. to put some order into a document by using styles? Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber = 2 Then oPara.Style = "Heading 2" End If Next oPara or format all the levels except the first with the matching Heading styles Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs If oPara.Range.ListFormat.ListLevelNumber 1 Then oPara.Style = "Heading " & _ oPara.Range.ListFormat.ListLevelNumber End If Next oPara I still cannot think of an elegant way of differentiating the first level from the underlying text (though there may well be one) but the other macro I posted earlier would handle level 1 -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org "Stefan Blom" wrote in message ... Wouldn't testing for ParagraphObject.Range.ListFormat.ListLevelNumb er work? Even if this works, it won't be 100% reliabe, I guess. A document may contain several different lists. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Graham Mayor" wrote in message ... Even working with vba seems problematical, as the levels associated with the bullets do not seem to be accessible. However the following macro *may* help. Put the cursor in one of the bulleted paragraphs in question and all paragraphs that have the same indent will be formatted with the heading style number ( 1 - 9) entered into the dialog. The original bullet will be removed and will only be re-applied if the chosen heading style is bulleted. The only snag that immediately comes to mind is that there may be unbulleted paragraphs with the same left indent Sub AddHeadingStyle() Dim iIndent As Long Dim iStyle As String Dim oPara As Paragraph Start: On Error Resume Next iStyle = InputBox("Enter Heading Style number 1-9") If iStyle = "" Then Exit Sub iIndent = Selection.Paragraphs(1).LeftIndent For Each oPara In ActiveDocument.Paragraphs If oPara.LeftIndent = iIndent Then oPara.Style = "Heading " & iStyle End If Next oPara End Sub http://www.gmayor.com/installing_macro.htm I would recommend testing it on a copy of the document. -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org "Stefan Blom" wrote in message ... My point was that, as far as I know, there is no way in the user interface to do what the OP is asking for. Maybe it can be automated with VBA. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Suzanne S. Barnhill" wrote in message .. . The problem here is that the multilevel bullets have already been applied, presumably to Normal style, and the paragraphs have been progressively indented to create three different levels. There should be some way to distinguish among these three levels (which are clearly displayed differently) in order to search for paragraphs at a specific level and apply a specific style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message . .. Paul, You can set up multilevel/outline bullets via that same dialog box. Just choose a bullet for "Number style." There are some predefined bullets already in the drop down box, but if you don't see what you want, click "New Bullet" to select the desired bullet character. In this case I'd start with the Modify Style dialog box for Heading 1, setting up the desired bullet format for each levels, making sure to associate each level with the corresponding heading style. However, I don't know of a way to automate the application of styles to text; that, I'm afraid, will be a manual task. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Paul" wrote in message ... Stefan, The text consists of multilevel bullets, not numbered list items. I am trying to find and select all bullets of a specific level so that I can apply a Heading style to them. Does your suggestion still apply? On Apr 30, 3:06 pm, "Stefan Blom" wrote: In Word 97-2003, you must always use the Customize Outline Numbered List dialog box when setting options for an outline-numbered list, yes. Note that the recommended approach is to define your lists with a unique paragraph style attached to each level; you apply (and edit) number formatting via the Modify Style dialog box for the top-level style. Seehttp://www.shaunakelly.com/word/numbering/OutlineNumbering.html. If you are modifying a list that is not associated with styles, place the insertion point in the first level 1 item before clicking Format | Bullets and Numbering. "Paul" wrote I put the cursor in one of the pasted bullet paragraphs. I invoked Format-BulletsAndNumbering-Customize. All the numerical positioning parameters are zero: * BulletPosition-IndentAt * TextPosition-TabSpaceAfter * TextPosition-IndentAt That's odd, I thought. So invoked the Reveal Formatting pane from the Styles and Formatting pane, and sure enough, the Bullets and Numbering section showed the above three parameters to be zero. According to Reveal Formatting, the *only* difference between bullets of different levels is in the Left Indent, in the Paragraph parameters of the Reveal Formatting pane. Suzanne, is looking at the Bullets and Numbering pane as described above what you had in mind? On Apr 30, 1:36 pm, "Suzanne S. Barnhill" wrote: In this case the indent is set in the Bullets (Numbering) dialog rather than Paragraph, so perhaps you should try that instead. "Paul" wrote: I posted this in another thread, but the thread title dealt with a larger contextual problem, so it may go unnoticed. In Word 2003, I want to search for, and select, all paragraphs that conform to a list of attributes e.g. left indent of 0.53", hanging indent at 0.26", etc.. From the "Find and Replace" panel, I chose Format-Paragraph, and set the left indent to 0.53", etc.. Word did not find any of the paragraphs conforming to these attributes, even though they exist. Is there a way to search for (and select) paragraphs based on formatting parameters? I am using Word 2003. |
#34
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain formatparameters
Will do. Thanks again.
On May 4, 12:25*am, "Graham Mayor" wrote: Seehttp://www.gmayor.com/installing_macro.htm The posted macro will work with multi-level bulleted (and numbered) lists "Paul" wrote: Suzanne, Stefan, Graham, Thanks for your indepth replies...I wasn't expecting to experiment with VBA, which always takes a while for me to get oriented in, being not a VBA programmer. *I will need to follow up when I have a window of breathing room (I ploughed through the multilevel bullets and manually turned them into different-level headings). *This is something that I expect to do more than once, so I *have no doubt that I will be following up with the coding examples at some point. |
#35
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to search for (and select) paragraphs with certain formatparameters
Will do. Thanks again.
On May 4, 12:25*am, "Graham Mayor" wrote: Seehttp://www.gmayor.com/installing_macro.htm The posted macro will work with multi-level bulleted (and numbered) lists "Paul" wrote: Suzanne, Stefan, Graham, Thanks for your indepth replies...I wasn't expecting to experiment with VBA, which always takes a while for me to get oriented in, being not a VBA programmer. *I will need to follow up when I have a window of breathing room (I ploughed through the multilevel bullets and manually turned them into different-level headings). *This is something that I expect to do more than once, so I *have no doubt that I will be following up with the coding examples at some point. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Select all paragraphs of a style, but only within selection | Microsoft Word Help | |||
Word 2000: Select a paragraphs of certain style | Microsoft Word Help | |||
How to apply HeadingX to all paragraphs containing search string | Microsoft Word Help | |||
Using CTRL key to select different paragraphs | Microsoft Word Help | |||
Does Ctrl button allow to select multiple paragraphs within a docu | Microsoft Word Help |