473,512 Members | 15,363 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Powerpoint interop error

TextFrame (unknown member) : Invalid request. This type of shape cannot have
a TextRange

i got this error while i m fetching text from textframe which is in the slide

my code is following can any one help me to get all text from slide

For Each pptSlide In pptDoc.Slides

shapes1 = pptSlide.Shapes
For j As Integer = 1 To shapes1.Count

tf = shapes1.Item(j).TextFrame
If TypeOf tf.TextRange Is PowerPoint.TextRange Then
If Not tf.TextRange Is Nothing Then
str1 += tf.TextRange.Text + " "
End If

Else
If TypeOf shapes1.Item(j) Is PowerPoint.Table
Then
Dim dt As PowerPoint.Table = shapes1.Item(j)

'For Each tShape As PowerPoint.Shape In dt.
Rows.Count

' If tShape.TextFrame IsNot Nothing Then
' str1 += tShape.TextFrame.TextRange.
Text + " "
' End If
'Next
For i As Integer = 0 To dt.Columns.Count
For t As Integer = 0 To dt.Rows.Count
str1 += dt.Cell(t, i).Shape.TextFrame.
TextRange.Text
Next
Next
End If
End If
Next
Next

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200709/1

Sep 22 '07 #1
0 1158

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6333
by: Ryan | last post by:
PowerPoint.Application cannot open PPT file I am trying to use the following code using to open a PPT file using VS.NET 2003 and PowerPoint 2003 Option Strict Off Imports...
0
1215
by: kevininstructor | last post by:
I found a good example at Microsoft but appear to have some slight problems. Example @ Microsoft http://support.microsoft.com/default.aspx?scid=kb;EN-US;303717 Note:I followed all the...
2
10178
by: WillRead | last post by:
I have a VB.Net application and a PowerPoint presentation explaining how each form in the application works, etc.. I would like to select and display the slide appropriate for each form by pressing...
4
42111
by: Joseph | last post by:
I am trying to open a 3 powerpoint presentation simultaneously afte each other without interruption, the operator of the application doe not need to notice anything or interfere in the operation of...
0
2547
by: Marc Eggenberger | last post by:
Hi there. I have an webapp (asp.net) which should use powerpoint to create a presentation and then send that presentation to the user. I'm using VS2003 and Office2003 (project req.). The...
2
4387
by: jack | last post by:
Hello, I would like to take a PowerPoint file and make JPGs or GIFs out of each slide. How can I do this in VB.NET. Thanks for any help, Jack
0
1340
by: bosky101 | last post by:
hi, im using VS 2005 ,and working on a windows applicaiton that opens powerpoint files. I ahve stumbled upon the folowing problems : 1. no pIA 's for office 2000 . what do i do ? 2. i managed...
35
13614
by: gill1978 | last post by:
Hi, What I'm trying to do is, once the users select the files they want to merge, they select a button which will: 1. Open an instance of powerpoint 2. Open the first of the files selected...
1
11824
by: chrizstone | last post by:
Hi Guys, What i want to do is: I want to create a Slide programmatically where a Table is on it! Here´s my Code: String strTemplate; strTemplate = template; String...
0
7252
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7371
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7517
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5676
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.