Class BulletFormat (PowerPoint VBA)

The class BulletFormat represents bullet formatting. To use a BulletFormat class variable it first needs to be instantiated, for example


Dim bft as BulletFormat
Set bft = ActiveWindow.Selection.TextRange.ParagraphFormat.Bullet

Character

Returns or sets the Unicode character value that is used for bullets in the specified text.


ActiveWindow.Selection.TextRange.ParagraphFormat.Bullet.Character = 8226

Font

Returns a Font object that represents character formatting.


Dim fntFont As Font
Set fntFont = ActiveWindow.Selection.TextRange.ParagraphFormat.Bullet.Font

Number

Returns the bullet number of a paragraph when the Type property of the BulletFormat object is set to ppBulletNumbered.

If this property is queried for multiple paragraphs with different numbers, then the value ppBulletMixed is returned. If this property is queried for a paragraph with a type other than ppBulletNumbered, then a run-time error occurs.


Dim lngNumber As Long
lngNumber = ActiveWindow.Selection.TextRange.ParagraphFormat.Bullet.Number

Picture

Sets the graphics file to be used for bullets in a bulleted list when the Type property of the BulletFormat object is set to ppBulletPicture.

Valid graphics files include files with the following extensions: .bmp, .cdr, .cgm, .drw, .dxf, .emf, .eps, .gif, .jpg, .jpeg, .pcd, .pct, .pcx, .pict, .png, .tga, .tiff, .wmf, and .wpg.

Picture (Picture)

RelativeSize

Returns or sets the bullet size relative to the size of the first text character in the paragraph.

The RelativeSize property value can be a floating-point value from 0.25 through 4, indicating that the bullet size can be from 25 percent through 400 percent of the text-character size.


ActiveWindow.Selection.TextRange.ParagraphFormat.Bullet.RelativeSize = 1.25

StartValue

Returns or sets the beginning value of a bulleted list when the Type property of the BulletFormat object is set to ppBulletNumbered.

The value of the StartValue property must be in the range of 1 to 32767.


ActiveWindow.Selection.TextRange.ParagraphFormat.Bullet.StartValue = 5

Style

Returns or sets the bullet style. Here you can find possible values for PpNumberedBulletStyle.

Some of the PpNumberedBulletStyle constants may not be available to you, depending on the language support (U.S. English, for example) that you've selected or installed.


ActiveWindow.Selection.TextRange.ParagraphFormat.Bullet.Style = ppBulletAlphaLCParenBoth

Type

Represents the type of bullet. Possible return values are ppBulletMixed - Mixed bullets, ppBulletNone - No bullets, ppBulletNumbered - Numbered bullets, ppBulletPicture - Bullets with an image, ppBulletUnnumbered - Unnumbered bullets.

The value of the Type property can be one of these PpBulletType constants.


ActiveWindow.Selection.TextRange.ParagraphFormat.Bullet.Type = ppBulletMixed

UseTextColor

Determines whether the specified bullets are set to the color of the first text character in the paragraph.

You cannot explicitly set this property to msoFalse. Setting the bullet format color (using the Color property of the Font object) sets this property to msoFalse. When UseTextColor is msoFalse, you can set it to msoTrue to reset the bullet format to the default color. The value of the UseTextColor property can be one of these MsoTriState constants.


ActiveWindow.Selection.TextRange.ParagraphFormat.Bullet.UseTextColor = msoTrue

UseTextFont

Determines whether the specified bullets are set to the font of the first text character in the paragraph.

You cannot explicitly set this property to msoFalse. Setting the bullet format font (by using the Name property of the Font object) sets this property to msoFalse. When UseTextFont is msoFalse, you can set it to msoTrue to reset the bullet format to the default font. The value of the UseTextFont property can be one of these MsoTriState constants.


ActiveWindow.Selection.TextRange.ParagraphFormat.Bullet.UseTextFont = msoTrue