運行word, excel,powerpoint應用程序

運行word

            try
            {
                string strFilePath = "C://Program Files//Microsoft Office//OFFICE11//WINWORD.EXE";
                System.Diagnostics.Process.Start(strFilePath);
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.Message, "系統提示");
            }  

運行excel

            try
            {
                string strFilePath = "C://Program Files//Microsoft Office//OFFICE11//EXCEL.EXE";
                System.Diagnostics.Process.Start(strFilePath);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "系統提示");
            }

運行powerpoint

            try
            {
                string strFilePath = "C://Program Files//Microsoft Office//OFFICE11//POWERPNT.EXE";
                System.Diagnostics.Process.Start(strFilePath);
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.Message, "系統提示");
            }

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章