Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
295 views
in Technique[技术] by (71.8m points)

macos - Must I use ActiveXObject to open a powerpoint presentation in html

I have the following code snippet which simply opens a Powerpoint presentation and calls a VBA macro.

function CallVBA()  
{   
    var App;  
    App = new ActiveXObject("PowerPoint.Application");
    App.Visible = true;
    App.Presentations.Open("D:\Jonathan\PPtHymns\b.pptm");
    App.Run("Doit");
}

While this works fine on Windows, it does not work on a Mac because of using ActiveX objects.
Is there another way of opening a Powerpoint presentation within a html page?
This may appear to be trivial, but I wish use code to add several new slides and text into the presentation and then run the presentation manually when done.

question from:https://stackoverflow.com/questions/65923669/must-i-use-activexobject-to-open-a-powerpoint-presentation-in-html

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

There appears to be no alternative at present.
As I wanted to build up slides from Excel spreadsheets, the only way to make this happen on both Mac and PC is to create a tab delimited file output from excel. Open the powerpoint app and use javascript/typescript in Script Lab.
So far this can not be done 100% as I can not see any javascript/typescript api's for inserting audio and text shapes and setting slide tansition properties. Perhaps I have missed them. Would someone please confirm?
Many thanks.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...