Enable save/print in PPT using OleClientSite
Hello all,
I am embedding Powerpoint in a SWT window with the code below. However, the save and print buttons in PowerPoint are greyed out and disabled. When I run PowerPoint from a shortcut on my desktop, the save and print icons are enabled. Any ideas how to enable saving and printing while PPT is in a SWT widow?
I apologize for cross posting to the SWT TIPs forum. I didn't realize it was a Tips forum until it was too late.
Code:
public static void main(String[] args)
{
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
OleFrame frame = new OleFrame(shell, SWT.NONE);
OleClientSite clientsite;
try
{
clientsite = new OleClientSite(frame, SWT.NONE, "PowerPoint.Slide");
shell.layout();
clientsite.doVerb(OLE.OLEIVERB_SHOW);
} catch (SWTException ex)
{
System.out.println("Failed to create <<Power Point Document>> : "
+ ex.getMessage());
return;
}
shell.open();
while (shell != null && !shell.isDisposed())
{
if (!display.readAndDispatch())
display.sleep();
}
}
Thanks.