Ejemplo n.º 1
0
        private void FrmRecord_Load(object sender, EventArgs e)
        {
            //先下载word
            string path = System.Environment.CurrentDirectory;
            string url  = Helper.DownloadFile(_directory, path);

            Helper.KillProcess();
            var word = new CtrlWinWord()
            {
                Dock     = System.Windows.Forms.DockStyle.Fill,
                Location = new System.Drawing.Point(0, 0),
                Name     = "文档",
                TabIndex = 1
            };

            //加载word的完整路径  修改此处
            word.LoadDocument(url);
            //word.LoadDocument(phath + @"\1.docx");
            word.Show();
            panelEx3.Controls.Add(word);
        }