C
Colleyville Alan
I have an application that was working fine a couple of months ago. Now I
want to adapt some of the code for a different project but suddenly, the
code does not work. Even more strange, properties that should be associated
with the object are no longer present.
Specifically, I am looking to pull the text out of textboxes on a slide. My
code checks each shape on the slide and if the type = 17 (textbox) then it
pulls out the text. It does check first to see if there is text in the box
as sometimes I get a slide with an empty text box that is invisible and it
crashes the program if the program tries to get text from an empty box, so
this is the line of code that I placed in there that was working just fine a
little while ago, but not now:
If oShape.TextFrame.TextRange.Text <> "" Then
I get an error message of "Method or data member not found" and the
TextRange portion of that line is highlighted. I have checked the object
model, and it *is* a part of TextFrame. But when I try to type using the
VBA autocompletion feature, it lists as options only "Application, Creator,
MarginBottom, MarginLeft, MarginRight, MarginTop, Orientation, and Parent.
That's 8 properties when the object explorer shows that there are 45
properties. The TextFrame property is not showing and a slew of other Shape
properties are not there either, what's gong on!?!?!
I am running this using Automation from Excel and I have the references
checked. Still, it looks as though PPT is thinking of something else other
than a shape.
Any insights would be appreciated.
Thanks
want to adapt some of the code for a different project but suddenly, the
code does not work. Even more strange, properties that should be associated
with the object are no longer present.
Specifically, I am looking to pull the text out of textboxes on a slide. My
code checks each shape on the slide and if the type = 17 (textbox) then it
pulls out the text. It does check first to see if there is text in the box
as sometimes I get a slide with an empty text box that is invisible and it
crashes the program if the program tries to get text from an empty box, so
this is the line of code that I placed in there that was working just fine a
little while ago, but not now:
If oShape.TextFrame.TextRange.Text <> "" Then
I get an error message of "Method or data member not found" and the
TextRange portion of that line is highlighted. I have checked the object
model, and it *is* a part of TextFrame. But when I try to type using the
VBA autocompletion feature, it lists as options only "Application, Creator,
MarginBottom, MarginLeft, MarginRight, MarginTop, Orientation, and Parent.
That's 8 properties when the object explorer shows that there are 45
properties. The TextFrame property is not showing and a slew of other Shape
properties are not there either, what's gong on!?!?!
I am running this using Automation from Excel and I have the references
checked. Still, it looks as though PPT is thinking of something else other
than a shape.
Any insights would be appreciated.
Thanks