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:
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
etc. etc.
Now I might add at this point, this snippet 'should' create bulletpoints, but it doesnt........?
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).
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]
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........?
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]