Problem in embedding .txt file in ppt presentation (C#.NET)

M

maneeshkhare

I am trying to embed a .txt file in a ppt slide in C#. This is the
code I am using:

slide.Shapes.AddOLEObject(
150, 150, 480, 320,
"Text",
missingNeighbourFileName,
MsoTriState.msoFalse,
"",
0,
"",
MsoTriState.msoFalse
);

where 'missingNeighbourFileName' is the string var holding the absolute
path to the .txt file. I am continously getting this exception:

"Shapes (unknown member) : Invalid request. "

Could anybody tell me what I am missing?

Thanks in advance.

Maneesh
 
M

maneeshkhare

OK, I fixed part of the issue. It seems that if I remove the "Text"
and make it a blank string, it works perfectly. What I need to make
this object fully embedded is something similar to
"ClassName:=Calendar....."
Not able to find any reference to appropriate values for ClassNames.
Does anybody have an idea?

/BR,
Maneesh
 
M

maneeshkhare

OK, I fixed part of the issue. It seems that if I remove the "Text"
and make it a blank string, it works perfectly. What I need to make
this object fully embedded is something similar to
"ClassName:=Calendar....."
Not able to find any reference to appropriate values for ClassNames.
Does anybody have an idea?

/BR,
Maneesh
 
S

Shyam Pillai

What purpose will the class name serve? The text document is already
embedded.
 

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