override the saveas function in powerpoint

N

neoret

Hei.

I'm programming an addin using c#. My applications overrides the users
actions to save a presentation. I add some information and needs to save the
presentation myself. In word and excel there is a method called
document/workbook saveas.

I cant get the method for saving a presentation to work...

theActivePpt.SaveAs(filename,
Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType.ppSaveAsPresentation,
Microsoft.Office.Core.MsoTriState.msoTriStateMixed);

I have tried serveral versions of the variables above.

I really hope someone knows how this can be solved :)
 
N

neoret

I get an exception when the saveAs method written earlier is called:
- the exception is a system.runtime.interopServices.COMException
- the error code is: -2147467259
- the message is Presentation(unknown member): Failed.

I tried your suggestion (theActivePpt.Save) - then I got an exception as
well :(

Neoret
 
N

neoret

Thanks for helping me getting closer to success!

Could this have anything to do with late bounding?

I found out in debugging that when I run this method from word the
applicationobject = Microsoft.office.interop.word.applicationClass.

When I run it in powerpoint the applicationobject = System_Comobject...

This is probably the problem - but do you know why this happens?
 

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