Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-18-2011, 07:07 AM
ghumdinger ghumdinger is offline Adjust list indents for all bulleted text (of different bullets) Windows 7 Adjust list indents for all bulleted text (of different bullets) Office 2010 (Version 14.0)
Advanced Beginner
Adjust list indents for all bulleted text (of different bullets)
 
Join Date: Jul 2010
Posts: 64
ghumdinger is on a distinguished road
Default Adjust list indents for all bulleted text (of different bullets)

Dear all,

I'm working on a doc where I have to adjust all bulleted text (only bulleted text) to 0.25" bullet position and 0.25" text indent.

I have tried to come up with a macro to do this, but it changes the different bullet symbols to the same bullet symbol. I only want the indents to be edited, not the bullet symbols. I am not a coder, so the macro was created using the record function.



I would appreciate if someone could tell me what needs to be changed. Thanks!

Jay

Code:
    Selection.WholeStory
    With ListGalleries(wdBulletGallery).ListTemplates(1).ListLevels(1)
        .NumberFormat = ChrW(61607)
        .TrailingCharacter = wdTrailingTab
        .NumberStyle = wdListNumberStyleBullet
        .NumberPosition = InchesToPoints(0.25)
        .Alignment = wdListLevelAlignLeft
        .TextPosition = InchesToPoints(0.25)
        .TabPosition = wdUndefined
        .ResetOnHigher = 0
        .StartAt = 1
        With .Font
            .Bold = wdUndefined
            .Italic = wdUndefined
            .StrikeThrough = wdUndefined
            .Subscript = wdUndefined
            .Superscript = wdUndefined
            .Shadow = wdUndefined
            .Outline = wdUndefined
            .Emboss = wdUndefined
            .Engrave = wdUndefined
            .AllCaps = wdUndefined
            .Hidden = wdUndefined
            .Underline = wdUndefined
            .Color = wdUndefined
            .Size = wdUndefined
            .Animation = wdUndefined
            .DoubleStrikeThrough = wdUndefined
            .Name = "Wingdings"
        End With
        .LinkedStyle = ""
    End With
    ListGalleries(wdBulletGallery).ListTemplates(1).Name = ""
    Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
        ListGalleries(wdBulletGallery).ListTemplates(1), ContinuePreviousList:= _
        False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _
        wdWord10ListBehavior
End Sub
Reply With Quote
  #2  
Old 09-18-2011, 11:45 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Adjust list indents for all bulleted text (of different bullets) Windows 7 64bit Adjust list indents for all bulleted text (of different bullets) Office 2010 32bit
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

Recorded VBA doesn't handle bullets (or numbering) very well. A lot of manual "tweaking" will be required.

Does the document contain only bullets, or are there numbered items as well (numbered items whose indentation should not change)? Are you using a single-level list or a multilevel (outline) list?
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #3  
Old 09-18-2011, 08:10 PM
ghumdinger ghumdinger is offline Adjust list indents for all bulleted text (of different bullets) Windows 7 Adjust list indents for all bulleted text (of different bullets) Office 2010 (Version 14.0)
Advanced Beginner
Adjust list indents for all bulleted text (of different bullets)
 
Join Date: Jul 2010
Posts: 64
ghumdinger is on a distinguished road
Default

Hi Stefan,

The document contains only bullets, and no numbering. There are multiple levels of bullets, but the author did not configure them using the multilevel list.

I am trying to adjust all the paragraphs with the bullets (whatever their level) to the same text and bullet indent, but such that the bullet symbol does not change.

Thanks,
Jay
Reply With Quote
  #4  
Old 09-19-2011, 01:50 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Adjust list indents for all bulleted text (of different bullets) Windows 7 64bit Adjust list indents for all bulleted text (of different bullets) Office 2010 32bit
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

OK, at least in principle, this shouldn't be difficult. Click the bullet character of the first item. That would highlight all bullets that are part of the same list (at that particular level). Then right-click again and select Adjust List Indents from the context menu. Specify the desired indentation. Repeat this for other bullets.

With a macro, you'd need something like this:

Code:
 
Sub ChangeListParasInDoc()
Dim LP As ListParagraphs
Dim p As Paragraph
Dim i As ListLevel
Set LP = ActiveDocument.ListParagraphs
For Each p In LP
For Each i In p.Range.ListFormat.ListTemplate.ListLevels
i.TrailingCharacter = wdTrailingTab
i.NumberPosition = 18 ' 0.25" indent from left margin
i.TextPosition = 36 ' position from left margin of text
i.TabPosition = 36 ' position of tab stop
Next i
Next p
End Sub
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional

Last edited by Stefan Blom; 09-19-2011 at 03:00 AM.
Reply With Quote
  #5  
Old 09-19-2011, 03:20 AM
ghumdinger ghumdinger is offline Adjust list indents for all bulleted text (of different bullets) Windows 7 Adjust list indents for all bulleted text (of different bullets) Office 2010 (Version 14.0)
Advanced Beginner
Adjust list indents for all bulleted text (of different bullets)
 
Join Date: Jul 2010
Posts: 64
ghumdinger is on a distinguished road
Default

The adjust list indent method worked. I wasn't aware that I could change the list indent for all paras of the same bullet at once.

The macro got a code 7 error. But never mind that, I'll read more about macros when I have time.

On a different note, is there a way to cause all paras marked with a certain bullet to be bold, for e.g., perhaps by selecting the bullet which selects all the bullets of that type and then formatting it with an unique mark (e.g. double strike through) and using find & replace to effect the formatting change that I want using prefix/ wildcards?
Reply With Quote
  #6  
Old 09-19-2011, 04:45 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Adjust list indents for all bulleted text (of different bullets) Windows 7 64bit Adjust list indents for all bulleted text (of different bullets) Office 2010 32bit
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

I just tested the macro again and I see that it isn't working with lists attached to styles. I don't know why--I have to think about this more. If I remember correctly, it did work in older versions...

I'm glad you got it to work in the user interface. It's the reliable way, apparently. :-)

And, yes, once you have selected bullets (or numbers) by clicking them you can apply font formatting to them. Note that the entire bullet/number, including any leading or trailing text, must use the same font formatting. Some formatting, such as strike-through, may not be visible, depending on the bullet character chosen.

I'm not sure how you want to use Find and Replace. You can't use it with text included with a bullet or number character, if that's what you're asking.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #7  
Old 09-19-2011, 05:39 AM
ghumdinger ghumdinger is offline Adjust list indents for all bulleted text (of different bullets) Windows 7 Adjust list indents for all bulleted text (of different bullets) Office 2010 (Version 14.0)
Advanced Beginner
Adjust list indents for all bulleted text (of different bullets)
 
Join Date: Jul 2010
Posts: 64
ghumdinger is on a distinguished road
Default

I'm trying to change the formatting for the text that's bulleted with a particular bullet, in my case >. But since there's no distinctive style attached to them, I'm trying to find a workaround.

I just tried another: Double click on that bullet to select all bullets of that symbol, apply a new style of the formatting I want. But it doesn't work. The style is only applied to that particular para of the bullet which I clicked and not for all the paras in the doc bulleted with >. =(
Reply With Quote
  #8  
Old 09-19-2011, 07:11 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Adjust list indents for all bulleted text (of different bullets) Windows 7 64bit Adjust list indents for all bulleted text (of different bullets) Office 2010 32bit
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

You can of course apply a character style to the whole bullet/number (including any leading or trailing text) in a list. That way, you can easily change font settings later, by modifying the style.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #9  
Old 09-19-2011, 07:20 AM
ghumdinger ghumdinger is offline Adjust list indents for all bulleted text (of different bullets) Windows 7 Adjust list indents for all bulleted text (of different bullets) Office 2010 (Version 14.0)
Advanced Beginner
Adjust list indents for all bulleted text (of different bullets)
 
Join Date: Jul 2010
Posts: 64
ghumdinger is on a distinguished road
Default

Thanks.

Does it work after the fact? I tried to change the font setting for the character style for that particular bullet symbol, but it does not automatically apply to all other paras with that symbol, unlike when I changed the indent.
Reply With Quote
  #10  
Old 09-19-2011, 10:28 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Adjust list indents for all bulleted text (of different bullets) Windows 7 64bit Adjust list indents for all bulleted text (of different bullets) Office 2010 32bit
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

I haven't tested this thoroughly, but it should work the way styles work in any other area of the document, that is, if you update the style, text using that style will update automatically.

In particular, note that I haven't tested if this is backward compatible (in case you want to save in Word 97-2003 format).
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #11  
Old 09-19-2011, 07:18 PM
ghumdinger ghumdinger is offline Adjust list indents for all bulleted text (of different bullets) Windows 7 Adjust list indents for all bulleted text (of different bullets) Office 2010 (Version 14.0)
Advanced Beginner
Adjust list indents for all bulleted text (of different bullets)
 
Join Date: Jul 2010
Posts: 64
ghumdinger is on a distinguished road
Default

Stefan, what I meant was to change the formatting after the document has already been largely done (it was by a previous author). For e.g.

- Test 1
> Test 2
- Test 3
> Test 4

I'm trying to bold all paragraphs with the ">" bullet. They have not been marked with a character style at the point of creation. I've tried to define a character style for all the ">" bullets at once (Define new bullet> Font> Bold), but the bold formatting only applies to, for e.g. only Test 2 instead of Test 2 & 4. On the other hand, changing the list indent does work for all the paragraphs with the same bullet symbol automatically.

It would be indeed so so much easier if I could find all ">" and mark them with a style.

Thanks,
Jay
Reply With Quote
  #12  
Old 09-20-2011, 12:22 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Adjust list indents for all bulleted text (of different bullets) Windows 7 64bit Adjust list indents for all bulleted text (of different bullets) Office 2010 32bit
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

OK, you want to apply the bold to the text of the paragraph following a particular bullet? If you have the "Keep track of formatting" option selected at File tab | Options | Advanced, and then select the option to display "Bullet and numbering formatting" in the Style Pane Options dialog box (in the Styles pane, click the Options link), you can right-click the entry for the bullet in the Styles pane and click to Select All Instances; then format the text as desired.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #13  
Old 09-20-2011, 09:46 PM
ghumdinger ghumdinger is offline Adjust list indents for all bulleted text (of different bullets) Windows 7 Adjust list indents for all bulleted text (of different bullets) Office 2010 (Version 14.0)
Advanced Beginner
Adjust list indents for all bulleted text (of different bullets)
 
Join Date: Jul 2010
Posts: 64
ghumdinger is on a distinguished road
Default

Oh my, you're marvelous!

Now that's a huge step forward in my education on Styles, from just knowing paragraph styles (which was already in itself quite powerful).

Cheers,
Jay
Reply With Quote
  #14  
Old 09-21-2011, 12:59 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Adjust list indents for all bulleted text (of different bullets) Windows 7 64bit Adjust list indents for all bulleted text (of different bullets) Office 2010 32bit
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

I'm glad I could help.

Note that if you want to enable the Select All X Instances feature with any blank document, you'll have to select "New documents based on this template" in the Style Pane Options dialog box before clicking OK.

For what it's worth, select All X Instances can be used with true styles as well (that is, with entries in the Styles pane that don't represent formatting or a style + formatting), but usually that shouldn't be necessary, as you can modify the style directly.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adjust list indents for all bulleted text (of different bullets) Numbered list turns to bullets when copy/pasted cathleenmcguire PowerPoint 6 08-31-2011 08:07 AM
Adjust list indents for all bulleted text (of different bullets) Problem with wrap text & bullets parasiteblue Drawing and Graphics 1 06-19-2011 08:53 PM
Bulleted and Numbered Lists peret944 Word 0 03-25-2011 01:08 PM
Adjust list indents for all bulleted text (of different bullets) Change color of text in bullets franklyorange PowerPoint 2 06-22-2010 04:51 AM
Adjust list indents for all bulleted text (of different bullets) 2-Column Text Slides and Aligning Bullets KitKatJM PowerPoint 1 03-09-2010 06:45 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:10 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft