完了,没分了.大家友情回答一下吧......
我想用VC控制powerpoint,于是看篇文章,我照看文章说的,却不能实现.大家帮我看一下.
我按照那个文章说的,建了一个基于对话框的程序,又选了msppt.obl,在选择类的对话框中,我用SHIFT键把所有的都选了.
然后我在头文件中包含它的文头件"msppt.h",并这样初始化:
if (!AfxOleInit())
{
AfxMessageBox("Failed to initialize OLE");
return FALSE;
}
还作了如下定义:
_Application app; // app is the Powerpoint _Application object
Presentations Presentations;
_Presentation Presentation;
SlideShowView View;
SlideShowWindow SlideShowWindow;
SlideShowSettings slideshow;
Slides slides;
_Slide slide;
到这里,程序还是没有错误的.
可我在按钮里加入:
Presentations = app.GetPresentations();
Presentation = Presentations.Open(strFileName,0,0,1);
时,就出了错,说Presentations没有Open这个方法.这是为什么?
我用的是OFFICE XP.