Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2008
    Posts
    2
    Rep Power
    0

    Default 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.
    Java 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.

  2. #2
    Join Date
    Dec 2008
    Posts
    2
    Rep Power
    0

    Default

    I have a similar problem when opening Word within a SWT frame. The print icon is enabled but the save icon is disabled. When I open Word from a desktop shortcut, all actions are enabled.

    Marshall B.

Similar Threads

  1. How can i save the data Internally(auto save)
    By Rama Koti Reddy in forum AWT / Swing
    Replies: 2
    Last Post: 11-01-2010, 09:31 PM
  2. Print the text file and print preview them
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-23-2008, 12:04 AM
  3. How to save name in Array and Print saved Name
    By ppkkyaw in forum New To Java
    Replies: 4
    Last Post: 06-15-2008, 07:44 AM
  4. Active Content enable problem
    By kasipandian in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 02-01-2008, 03:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •