Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-08-2013, 02:12 PM
moggymiaow moggymiaow is offline Bullet formatting code gets ignored Windows XP Bullet formatting code gets ignored Office 2007
Novice
Bullet formatting code gets ignored
 
Join Date: Sep 2013
Posts: 10
moggymiaow is on a distinguished road
Default Bullet formatting code gets ignored

after a copy and paste, I need to tidy up some formattingso I run this..Sub tidyBullets(oRange As Range) Dim oPara As Paragraph oRange.Select For Each oPara In Selection.Paragraphs If oPara.Range.ListFormat.ListType = WdListType.wdListBullet Then With oPara.Range.ParagraphFormat .LeftIndent = CentimetersToPoints(1.6) .FirstLineIndent = CentimetersToPoints(-0.8) .TabStops.ClearAll End With ElseIf oPara.Range.ListFormat.ListType = WdListType.wdListNoNumbering Then With oPara.Range.ParagraphFormat .LeftIndent = CentimetersToPoints(1.6) .FirstLineIndent = CentimetersToPoints(-0.8) .TabStops.ClearAll End With Else With oPara.Range.ParagraphFormat .LeftIndent = CentimetersToPoints(0.8) .RightIndent = CentimetersToPoints(0) .FirstLineIndent = CentimetersToPoints(-0.8) .TabStops.ClearAll .TabStops.Add 1.6, wdLeft End With End If Next End SubI can watching it stepping through the code quite happily and throw no errors, however there is no change to the formatting of the paragraphs. The document is not protected at this point
Reply With Quote
  #2  
Old 10-08-2013, 02:18 PM
moggymiaow moggymiaow is offline Bullet formatting code gets ignored Windows XP Bullet formatting code gets ignored Office 2007
Novice
Bullet formatting code gets ignored
 
Join Date: Sep 2013
Posts: 10
moggymiaow is on a distinguished road
Default

OK, how do I get the code to have line breaks in it on this forum?
Reply With Quote
  #3  
Old 10-08-2013, 02:20 PM
moggymiaow moggymiaow is offline Bullet formatting code gets ignored Windows XP Bullet formatting code gets ignored Office 2007
Novice
Bullet formatting code gets ignored
 
Join Date: Sep 2013
Posts: 10
moggymiaow is on a distinguished road
Default

Sub tidyBullets(oRange As Range)
Dim oPara As Paragraph
oRange.Select
For Each oPara In Selection.Paragraphs
If oPara.Range.ListFormat.ListType = WdListType.wdListBullet Then
With oPara.Range.ParagraphFormat
.LeftIndent = CentimetersToPoints(1.6)
.FirstLineIndent = CentimetersToPoints(-0.8)
.TabStops.ClearAll
End With
ElseIf oPara.Range.ListFormat.ListType = WdListType.wdListNoNumbering Then
With oPara.Range.ParagraphFormat
.LeftIndent = CentimetersToPoints(1.6)
.FirstLineIndent = CentimetersToPoints(-0.8)
.TabStops.ClearAll
End With
Else
With oPara.Range.ParagraphFormat
.LeftIndent = CentimetersToPoints(0.8)
.RightIndent = CentimetersToPoints(0)
.FirstLineIndent = CentimetersToPoints(-0.8)
.TabStops.ClearAll
.TabStops.Add 1.6, wdLeft
End With
End If
Next
End Sub
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bullet formatting code gets ignored How to globally change the formatting of a bullet style to another style? ravl13 Word 5 03-10-2013 05:04 PM
Bullet formatting code gets ignored Formatting by Bullet Level Caron84 Word 2 01-17-2013 10:27 AM
Defining New Bullet - Custom Bullet dsberger PowerPoint 0 11-28-2012 10:20 AM
Custom formatting code - rounding problem venkys4u Excel 1 08-14-2012 07:45 PM
Bullet formatting code gets ignored Formatting bullet list Daved2424 Word 4 11-22-2010 10:36 AM

Other Forums: Access Forums

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


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