late binding with powerpoint - please help!

P

Peter Baumgarten

Hello,
i try to use late binding for office automation with powerpoint and
c#.
I found some examples for word which work fine:


Type comType;
object comObject;

comType = Type.GetTypeFromProgID("Word.Application");
comObject = Activator.CreateInstance(comType);

object o = comType.InvokeMember("Application", BindingFlags.Public |
BindingFlags.GetProperty, null, oPptAppObject, null);
....
....


So far everything works fine. The Compiler is happy
But when i replace the ...("Word.Application")... with
....("PowerPoint.Application")...
i get an exception (which says: unknown name) for line with:

object o = comType.InvokeMember.....

Also "Application" is a Member of PowerPoint, like it is in Word.
I also tried other Members from PowerPoint but was not lucky.
I googled the whole day, but no solution.

Can anybody help me please?
It have no idea what to do.
Thanks a lot!
 

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