Creating Bullet points in word from array

In Distress

New Member
Joined
Mar 12, 2003
Messages
37
Howdy all,

Again I've had to seek high council from the numerous gurus that linger here (you all know who you are).

Okay, right down to it, I'm trying to create a word document with some basic formatting and information from data within an excel sheet, but it seems when I get to the bulletpoint bit - it just doesn't want to do it! I even went to word, recorded a macro to get the right object references etc and still no go.

Now I will add, I probably should be using arrays to hold the data I want word to bulletpoint, but for some reason, I could never get my head around arrays.

Now this is crude, but let's say I have established the starting column and ending columns of the data I want to bulletpoint in the word document.

I'm trying to create the bullet points using:
Code:
    With ListGalleries(wdBulletGallery).ListTemplates(1).ListLevels(1)
        .NumberFormat = ChrW(61623)
        .TrailingCharacter = wdTrailingTab
        .NumberStyle = wdListNumberStyleBullet
        .NumberPosition = InchesToPoints(0.25)
        .Alignment = wdListLevelAlignLeft
        .TextPosition = InchesToPoints(0.5)
        .TabPosition = InchesToPoints(0.5)
        .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.ApplyListTemplate ListTemplate:=ListGalleries( _
        wdBulletGallery).ListTemplates(1), ContinuePreviousList:=False, ApplyTo:= _
        wdListApplyToWholeList, DefaultListBehavior:=wdWord10ListBehavior

Now I know there is things that I could strip out of all that, but for now, I thought I'd leave it. the next lines that should follow this is each of the bullet points, for example

Code:
Selection.TypeText Text:="Blah"
Selection.TypeParagraph
Selection.TypeText Text:="Blah Again"
Selection.TypeParagraph

etc. etc.

Now I might add at this point, this snippet 'should' create bulletpoints, but it doesnt........? :devilish:

What I was hoping to do is cycle through a loop and add only bullets points for that data that exists.For example: (This is what I was trying to use as a replacement to the small snippet above).

Code:
CStartingRow = 2
CEndingRow = 5
While CStarting <=EndingRow Then
     Selection.TypeText Text:=(Sheets("Combined").Cells(4,(CStartingRow)).Value
     Selection.TypeParagraph 
     CStartingRow = ((CStartingRow)+1)
Wend

Guess what - it doesn't work.

Hopefully someone understands this mess and can help me out. Thanks to all in advance. Just so you all know, anyone that can help me will be saving me about 8 hours of manual typing all this data I have into word.

Cheers[/code]
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,214,515
Messages
6,119,974
Members
448,934
Latest member
audette89

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top