Formating Paragraph programatically

  • Thread starter Thread starter bbussoloti
  • Start date Start date
B

bbussoloti

Hi,
I have an Issue that I hope you guys can help me out. I'm running a code
from Access that creates a new .ppt presentation and formats it's content,
according to the code bellow (the formating part):

i = 2
rcdSet.MoveFirst
Do While Not (rcdSet.EOF)
currPres.Slides(i).Shapes(1).TextFrame.TextRange.Text = rcdSet("Código do
Projeto:") & " - " & rcdSet("Nome do Projeto:")
currPres.Slides(i).Shapes(2).TextFrame.TextRange.Text = "Líder
Responsável: " & rcdSet("Líder responsável:") & Chr(13) & _
"KPI Associado 2009: " & rcdSet("Alinhamento Estratégico - KPI Associado
- 2009:") & Chr(13) & _
"Basket: " & rcdSet("Basket:") & Chr(13) & _
"Abrangência BU: " & rcdSet("Abrangência BU:") & Chr(13) & _
"Data Alvo: " & rcdSet("Data alvo (para fim do projeto):") & Chr(13) & _
"Status em TI: " & rcdSet("Status em TI:") & Chr(13) & _
"CAPEX TI: " & rcdSet("Custo - CAPEX TI:") & Chr(13) & _
"Benefício - Margem Líquida: " & rcdSet("Benefício - Margem Líquida:") &
Chr(13) & _
"Benefício Qualitativo (caso houver): " & Chr(13)

currPres.Slides(i).Shapes(2).TextFrame.TextRange.ParagraphFormat.Bullet.Type
= ppBulletNone
currPres.Slides(i).Shapes(2).TextFrame.TextRange.InsertAfter
(rcdSet("Descrição do Benefício Qualitativo (caso houver):") & Chr(13))

currPres.Slides(i).Shapes(2).TextFrame.TextRange.ParagraphFormat.Bullet.Type
= ppBulletUnnumbered
currPres.Slides(i).Shapes(2).TextFrame.TextRange.InsertAfter ("Por que
este projeto deve continuar em 2009: " & Chr(13))

currPres.Slides(i).Shapes(2).TextFrame.TextRange.ParagraphFormat.Bullet.Type
= ppBulletNone
currPres.Slides(i).Shapes(2).TextFrame.TextRange.InsertAfter (rcdSet("Por
que este projeto deve continuar em 2009?"))

rcdSet.MoveNext
If Not (rcdSet.EOF) Then
currPres.Slides(i).Duplicate
End If
i = i + 1
Loop


My issue is when I start to change the bullet property. I was doing that
because those specific recordset fields can contain (or not) new lines, and
so my presentation contained bullets where they should not exist.
However by doing that with the code above, my whole presentation has no
bullets (because it was the last property set, when i tried to remove the
bullets only from one recordset field.)

How can I achieve what I'm trying to do?

Thanks in advance.
 
Thanks Steve. I played with the idea of using the .textRange.Paragraphs(n)
attribute. It Worked.
 
Back
Top