You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working on a Java application that interacts with Microsoft PowerPoint using the JACOB (Java COM Bridge) library.
Here's the issue I'm encountering:
When I set the Visible property of the PowerPoint application to false, I receive the following error:
java.lang.RuntimeException: com.jacob.com.ComFailException: Invoke of: Visible
Source: Microsoft PowerPoint
Description: Application.Visible : Invalid request. Hiding the application window is not allowed.
Here's a snippet of my current code:
ComThread.InitSTA();
ActiveXComponent ppt = null;
Dispatch presentations = null;
Dispatch presentation = null;
ppt = new ActiveXComponent("PowerPoint.Application");
// ppt.setProperty("Visible", new Variant(true)); //only true can work
// ppt.setProperty("Visible",false); //not work
// ppt.setProperty("Visible", 0); //not work
presentations = ppt.getProperty("Presentations").toDispatch();
presentation = Dispatch.call(presentations, "Open", pptFilePath, new Variant(false),
new Variant(false), new Variant(false)).toDispatch();
Am I missing something?
Is there a better way to handle the visibility of the PowerPoint application window when using JACOB?
The text was updated successfully, but these errors were encountered:
Hello everyone,
I'm currently working on a Java application that interacts with Microsoft PowerPoint using the JACOB (Java COM Bridge) library.
Here's the issue I'm encountering:
When I set the Visible property of the PowerPoint application to false, I receive the following error:
Here's a snippet of my current code:
Am I missing something?
Is there a better way to handle the visibility of the PowerPoint application window when using JACOB?
The text was updated successfully, but these errors were encountered: