Power Point and C#: ViewType 的特性與其應用:SlideShowWindow等

 在自動化時「ViewType」極其重要,蓋決定是否可以用 Selection 屬性以設定也。

支援 Select()方法的有以下幾種

ppViewNormal、、、

常見錯誤如下:

 There is no currently active document window.

This view does not support selection.

自撰程式碼範例如下:感恩感恩 南無阿彌陀佛

        private void runSlideShow(PowerPnt.Slide sld)
        {
            if (checkBox2.Checked)
            {//http://www.exceloffice.net/archives/4127
             //執行後即播放投影片
                if (ppt == null)
                {
                    pptApp = (PowerPnt.Application)getOffice(officeEnum.PowerPoint);
                    ppt = pptApp.ActivePresentation;
                    ppt.Application.Activate();
                    sld = pptApp.ActiveWindow.View.Slide;
                }
                PowerPnt.SlideShowSettings oSSS = ppt.SlideShowSettings;
                PowerPnt.SlideShowWindow ssw = oSSS.Run();
                ssw.View.GotoSlide(sld.SlideIndex);
            }
            else ppt.Application.Activate();
        }

PpViewType 列舉 (PowerPoint) | Microsoft Docs

DocumentWindow.ViewType 屬性 (PowerPoint) | Microsoft Docs

Pane.ViewType 屬性 (PowerPoint) | Microsoft Docs

SlideShowWindow 物件 (PowerPoint) | Microsoft Docs

SlideShowWindow object (PowerPoint) | Microsoft Docs

SlideShowWindow.Active Property (Microsoft.Office.Interop.PowerPoint) | Microsoft Docs


SlideShowWindow - Google 搜尋

c# - How to test for PowerPoint SlideShowWindow object? - Stack Overflow


close SlideShowWindows - Google 搜尋

How to close out of slideshow view at a given time/time interval in powerpoint VBA? - Stack Overflow

Player object (PowerPoint) | Microsoft Docs  【停止播放/投放】

Player.Stop method (PowerPoint) | Microsoft Docs

Player.Play method (PowerPoint) | Microsoft Docs


SlideShowView.EndNamedShow method (PowerPoint) | Microsoft Docs


SlideShowSettings 物件 (PowerPoint) | Microsoft Docs


留言

熱門文章