![]() |
|
|||||||
|
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Hi all. I assigned 2 bullet points with specific indent settings to 2 hotkeys. However, when I use them together, there is a minor issue.
What I want to get: (This can be achieved if I press the Enter twice to eliminate the black dot and then press the hotkey for the black square) 2017-12-16_150153.jpg Ps: the specific indent info are included in their codes below. If I just press the hotkey for the black square in a blank line with the black circle in the front, I will get: 2017-12-16_150208.jpg I tried to incorporate the 2 pressings of Enter into the macro of the black square, but it seems like under the recording mode, 2 pressings in a line starting with the black circle will simply create 2 blank lines rather than eliminate the black circle in the front. Could someone help me out on this? Thank you very much! Code for the black circle: Code:
Sub BlackCircle()
'the hot key is F13
With ListGalleries(wdBulletGallery).ListTemplates(1).ListLevels(1)
.NumberFormat = ChrW(61623)
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleBullet
.NumberPosition = InchesToPoints(0.5)
.Alignment = wdListLevelAlignLeft
.TextPosition = InchesToPoints(0.75)
.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 = "Symbol"
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
Code:
Sub BlackSquare()
'the hot key is F14
With ListGalleries(wdBulletGallery).ListTemplates(1).ListLevels(1)
.NumberFormat = ChrW(61607)
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleBullet
.NumberPosition = InchesToPoints(0.75)
.Alignment = wdListLevelAlignLeft
.TextPosition = InchesToPoints(0.1)
.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
Last edited by puff; 12-16-2017 at 04:14 PM. |
|
#2
|
||||
|
||||
|
You should create an appropriately-formatted Style and use that instead of either the default or a macro.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#3
|
|||
|
|||
|
Quote:
JK. I solved the assigning issue. My question now is in my edited post above. |
|
#4
|
||||
|
||||
|
You are going about this completely the wrong way. I suggest you read:
https://support.office.com/en-us/art...7-1eb120dec563 http://www.addbalance.com/usersguide/styles.htm https://shaunakelly.com/word/styles/stylesms.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#5
|
|||
|
|||
|
Thank you for your helpful links. I notice that a list bullet style will apply to all the bullet points in a document. However, I just use bullet points to organize notes, so their indents, although fixed within a section, might be flexible in a document's different sections. And that's why I used macro to give me a bullet with a default indent and allows some fluctuations. I still need to solve the problem mentioned previously though.
|
|
#6
|
||||
|
||||
|
Forget the built-in list bullet Style; you can create multiple custom Bullet Styles & Indent Styles for a document. It's then just a matter of choosing which one you want to use in a given situation. See attached. You should not be using a macro to apply the formatting - that way lies document corruption.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help With Bullet Points In Powerpoint | Phil_CF | PowerPoint | 2 | 09-10-2016 03:12 AM |
Trouble using bullet points / sub bullet points within Word 2013
|
Mr Davo | Word | 2 | 04-18-2016 04:31 PM |
| Bullet text indent problem | dfp1964 | PowerPoint | 0 | 12-04-2011 08:03 AM |
Bullet points are messed up
|
TempleClause | Word | 4 | 06-08-2010 11:53 AM |
| Indent Points in Word 07 | crackinthekraken | Word | 0 | 01-19-2010 03:54 PM |