Erase Bulleted text Individually.

G

Guest

I am working on Powerpoint Automation. I have to erase that bulleted text on
the slide as soon as the slide show starts, Becoz I want to put something
else in place of those bulleted text. Now, the problem is that I m able to
erase the text but when it comes to removing individual bulleted text I am
not able to erase them Individually. For say, If I just want to erase the
first bulllet then I cannot do that. If I try to erase it all the other
bullets under it gets erased. So, its taking all the bullets as one entity.
Is there any way so that I can handle Individual bulleted text and,
hence, I can erase whichever bulleted text I want to erase? I am trying is
to erase the text programmatically Using VC++ and Powerpoint Automation.

Thanks.
 
G

Geetesh Bajaj

Use more than one text box and line them below each other so that it looks
like one text box. But then that's something you can do without programming
using trigger animations in PowerPoint 2002 or 2003.
 
A

Abhishek Bagga

What version of PPT are you using?
As Geetesh mentioned , animations will be a better option but if you want to
do it through coding then ..
If possible send us the code since I think you are deleting the complete
text of the textbox instead of the line
you can try this

sTextRangeSen= m_PPTShape.TextFrame.TextRange.Paragraphs(iSentences,1);
sTextRange= sTextRangeSen.Lines(iLines,1);
sTextRange.Text.Delete(); or sTextRange.Text="";

I think this should work if it does not then you can post your coding.
 
G

Guest

The code is :


Sub removetext()
Dim sld As Slide
Dim shp As Shape
For Each sld In ActivePresentation.Slides
For Each shp In sld.Shapes
If shp.HasTextFrame Then
If shp.TextFrame.HasText Then
shp.TextFrame.TextRange.Text = ""
MsgBox "done"

End If
End If
Next shp
Next sld
End Sub


Can u get from this what we are trying to do? I hope u can poitn out what we
have to add/remove from the code.

thanks
 
S

Steve Rindsberg

Technoknight said:
The code is :

Sub removetext()
Dim sld As Slide
Dim shp As Shape
Dim x as long
For Each sld In ActivePresentation.Slides
For Each shp In sld.Shapes
If shp.HasTextFrame Then
If shp.TextFrame.HasText Then

' iterate through the .Paragraphs collection
With shp.textframe.textrange
for x = 1 to .Paragraphs.Count
.Paragraphs(x).Text = cstr(x) & " - " & .Paragraphs(x).Text
Next
End with
' not this
 
G

Guest

the given code deletes only the number of bulleted text lines as there are
the number of paragraphs in the slide
as such it deletes only 2 bullets in the lower paragraph if the slide has
got 2 paragraphs
even thouhg the lower paragraph may have more than 2 bullets
 
S

Steve Rindsberg

Sorry, but I don't quite understand the problem. Can you post your code *as revised*
and we'll try again? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top