监控并读取播放中的Powerpoint文件。主要实现如下功能:    程序运行后,可以监控到Powerpoint文件的打开,当全屏播放时开始读取每一页的标题索引。!那位大哥可以帮我一下。高分不是问题,目前还有2000分可用。只要能解决,分数多少您说话!

解决方案 »

  1.   

    可以监控到Powerpoint文件的打开,这个监控进程就知道,但是后面的还没研究过,学习
      

  2.   

    你倒底要实现什么功能,不能在Powerpoint里面用宏来实现吗?
      

  3.   

    http://edu.136z.com/developer/4947.html
    http://support.microsoft.com/kb/303718/zh-cn
      

  4.   

    亲爱的2楼姐姐!这个功能是我的程序的通用功能,所以不能去再Powerpoint用宏来实现。而是需要程序自己捕获用户操作的powerpoint演示的目录。也就是说,开这个程序对用户来说不用去管是那一个Powerpoint都可以记录他播放的幻灯片。
      

  5.   

    using PowerPoint = Microsoft.Office.Interop.PowerPoint;  public static void ShowPresentation(string strTemplate, string projectname)
            {
                PowerPoint.Application objApp = new PowerPoint.Application();
                PowerPoint._Presentation objPres;
                objPres = objApp.Presentations.Open(strTemplate, MsoTriState.msoFalse, MsoTriState.msoFalse, MsoTriState.msoFalse);            //string strurl = System.Web.HttpContext.Current.Request.Url.ToString().Replace("default.aspx", "image");            objPres.SaveAs(realurl + "WZH_Project/" + projectname + "/PPT", PowerPoint.PpSaveAsFileType.ppSaveAsJPG, MsoTriState.msoCTrue);//Server.MapPath("")+"/image"            objPres.Close();
                //objApp.ActiveWindow.Close();
                objApp.Quit();
            }   
      

  6.   

     自己修改一下,把POWERPOINT.DLL转换成。NET DLL
      

  7.   

    icesfire,大哥能再详细一点,里面有几个变量找不到!还是有些问题,没搞懂,能给我个能运行的例子看看吗?!、
      

  8.   

    没办法,自己鳖了半个月弄出点眉目来,现共享出来!
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using PowerPoint = Microsoft.Office.Interop.PowerPoint;
    using System.Runtime.InteropServices;namespace PPTTest
    {
        public partial class Form1 : Form
        {
            private PowerPoint.Application oPptApp;
            public Form1()
            {
                InitializeComponent();            
            }
            private int slipeint;        private void Form1_Load(object sender, EventArgs e)
            {        }        private void button1_Click(object sender, EventArgs e)
            {
                this.Activate();            //Get reference to Excel.Application from the ROT.
                oPptApp = (PowerPoint.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("PowerPoint.Application");
                oPptApp.SlideShowBegin += new Microsoft.Office.Interop.PowerPoint.EApplication_SlideShowBeginEventHandler(oPptApp_SlideShowBegin);
                oPptApp.PresentationNewSlide += new Microsoft.Office.Interop.PowerPoint.EApplication_PresentationNewSlideEventHandler(oPptApp_PresentationNewSlide);
                oPptApp.SlideShowNextSlide += new Microsoft.Office.Interop.PowerPoint.EApplication_SlideShowNextSlideEventHandler(oPptApp_SlideShowNextSlide);
                //oPptApp.SlideSelectionChanged += new Microsoft.Office.Interop.PowerPoint.EApplication_SlideSelectionChangedEventHandler(oPptApp_SlideSelectionChanged);            label1.Text = oPptApp.OperatingSystem;
                //Display the name of the object.
                //MessageBox.Show(oPptApp.Caption);
                //Release the reference.
                //oPptApp = null;
                
                //// QI for IConnectionPointContainer.
                //UCOMIConnectionPointContainer oConnPointContainer = (UCOMIConnectionPointContainer)oPPT;
                //// Get the GUID of the EApplication interface.
                //Guid guid = typeof(PowerPoint.EApplication).GUID;            //// Find the connection point.
                //oConnPointContainer.FindConnectionPoint(ref guid, out m_oConnectionPoint);
                //// Call Advise to sink up the connection.
                //m_oConnectionPoint.Advise(this, out m_Cookie);        }        //void oPptApp_SlideSelectionChanged(Microsoft.Office.Interop.PowerPoint.SlideRange SldRange)
            //{
            //    slipeint = SldRange.SlideID;
            //}        void oPptApp_SlideShowNextSlide(Microsoft.Office.Interop.PowerPoint.SlideShowWindow Wn)
            {
                slipeint = Wn.View.CurrentShowPosition;
                //string temp123;
                //temp123 = Wn.Presentation.Slides.Count.ToString();
                string temp2 = Wn.Presentation.Slides[slipeint].Shapes[1].TextFrame2.TextRange.Text;
                //slipeint++;
                MessageBox.Show(temp2);
               
                
            }        void oPptApp_PresentationNewSlide(Microsoft.Office.Interop.PowerPoint.Slide Sld)
            {
                //this.Activate();
                label1.Text = "1";
                //throw new Exception("The method or operation is not implemented.");
                MessageBox.Show("124124124124124124");
            }        void oPptApp_SlideShowBegin(Microsoft.Office.Interop.PowerPoint.SlideShowWindow Wn)
            {
                slipeint =Wn.View.CurrentShowPosition;            
                //string temp123;
                //temp123 = Wn.Presentation.
                //MessageBox.Show(temp123+"www");
                //MessageBox.Show(Wn.Presentation.Slides.s);
            }    }
    }
      

  9.   

    http://download.csdn.net/source/1608069
    具体的源码在这里!