How erp| conversions are used. NET to convert PowerPoint to HTML file
Of course we're going to use COM components, so we're going to install powerpoint2000, add a refrence to Vs.net and find Microsoft PowerPoint Object Library 9.0, add it in.
Then write the following code, very simple, I do not have to explain:
Using System;
Using Office;
Using PowerPoint;
Namespace Courseserver.course
{
<summary>
Author: Wang Hongsu
version:1.0
Date:2001/6/9
Description: Convert PowerPoint's PPT file to HTML file
</summary>
public class Convertpowerpoint
{
<summary>
Establish a reference to a powerpoint.application COM component
</summary>
Private powerpoint.application ppt;
<summary>
point to specific documents;
</summary>
Private Powerpoint.presentation Pptfile;
private string _htmlfilename;
<summary>
Write-only property to set the file path of the saved HTML file
</summary>
public string Htmlfilename
{
Set
{
_htmlfilename=value;
}
}
<summary>
Construction device
</summary>
Public Convertpowerpoint ()
{
//
Todo:add constructor Logic here
//
Ppt=new powerpoint.application ();
}
<summary>
Conversion process
</summary>
<param name= "Pptfilename" > PowerPoint file name to convert </param>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.