Does anyone know how to show the slides of a power point presentation as a Thumbnail on a Dialog app? Is that possible?
Thanks in advance.
Printable View
Does anyone know how to show the slides of a power point presentation as a Thumbnail on a Dialog app? Is that possible?
Thanks in advance.
CString strFileName;
TCHAR szFilters[]="PowerPoint Files (*.ppt)||";
CFileDialog fileDlg (TRUE, "ppt", "*.ppt",
OFN_FILEMUSTEXIST| OFN_HIDEREADONLY, szFilters, this);
if( fileDlg.DoModal ()==IDOK )
{
strFileName = fileDlg.GetPathName();
CoInitialize(NULL);
_Application m_ppt;
if(m_ppt.CreateDispatch("PowerPoint.Application"))
{
COleVariant var;
Presentations presentations = m_ppt.GetPresentations();
presentations.Open(strFileName,0,0,0);
var = presentations.GetCount();
_Presentation pre = presentations.Item(var);
Slides slides = pre.GetSlides();
var = slides.GetCount();
//Copy the lastest thumbnail to clipboard
_Slide slide = slides.Item(var);
slide.Copy();
m_hBitmap = NULL;
}
else
{//Can't find the powerpoint
TRACE("CreateDispatch Error\n");
ASSERT(0);
}
CoUninitialize();
}
else
{//Select no any one .ppt
}
Thanks alan_doh
That was an old project I was working on. At that time I ended up given up and forget about the thumbnail thing.
I'll try andlet you know!!
Thanks again,
Ric