资源简介

在Winform窗体中嵌入Word,并可以打开,编辑,保存Word编辑的文档,

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using Microsoft.Office.Interop.Word;
using System.Reflection;

namespace CreateWord
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnCreateWord_Click(object sender EventArgs e)
        {
            winWordControl1.CloseControl();
            string savePath = CreateWordFile(““ ““ ““ txtContent.Text txtImg.Text);
            MessageBox.Show(“新创建的word已经保存到:\n“ + savePath);
            lblSavePath.Text = savePath;
        }

        private void btnAddImg_Click(object sender EventA

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        144  2011-08-21 22:27  WordDemo\CreateWordDemo\CreateWord\app.config

     文件      36352  2011-08-22 22:46  WordDemo\CreateWordDemo\CreateWord\bin\Debug\AxInterop.SHDocVw.dll

     文件      28160  2011-08-23 14:17  WordDemo\CreateWordDemo\CreateWord\bin\Debug\CreateWord.exe

     文件        144  2011-08-21 22:27  WordDemo\CreateWordDemo\CreateWord\bin\Debug\CreateWord.exe.config

     文件      62976  2011-08-23 14:17  WordDemo\CreateWordDemo\CreateWord\bin\Debug\CreateWord.pdb

     文件      11592  2011-08-23 14:17  WordDemo\CreateWordDemo\CreateWord\bin\Debug\CreateWord.vshost.exe

     文件        144  2011-08-21 22:27  WordDemo\CreateWordDemo\CreateWord\bin\Debug\CreateWord.vshost.exe.config

     文件        490  2010-03-17 22:39  WordDemo\CreateWordDemo\CreateWord\bin\Debug\CreateWord.vshost.exe.manifest

     文件      17825  2011-08-21 22:29  WordDemo\CreateWordDemo\CreateWord\bin\Debug\doc\20110821222912.doc

     文件    1093632  2010-09-13 22:52  WordDemo\CreateWordDemo\CreateWord\bin\Debug\Interop.Excel.dll

     文件     396288  2011-08-21 22:27  WordDemo\CreateWordDemo\CreateWord\bin\Debug\Interop.Microsoft.Office.Core.dll

     文件     766464  2011-08-21 22:27  WordDemo\CreateWordDemo\CreateWord\bin\Debug\Interop.Microsoft.Office.Interop.Word.dll

     文件     155648  2005-10-10 16:00  WordDemo\CreateWordDemo\CreateWord\bin\Debug\Interop.Office.dll

     文件     120832  2011-08-22 22:46  WordDemo\CreateWordDemo\CreateWord\bin\Debug\Interop.SHDocVw.dll

     文件      57344  2010-04-28 16:39  WordDemo\CreateWordDemo\CreateWord\bin\Debug\Interop.VBIDE.dll

     文件     495616  2005-10-10 16:00  WordDemo\CreateWordDemo\CreateWord\bin\Debug\Interop.Word.dll

     文件    1550200  2010-03-03 20:07  WordDemo\CreateWordDemo\CreateWord\bin\Debug\Microsoft.Office.Interop.Excel.dll

     文件       4794  2010-04-27 13:08  WordDemo\CreateWordDemo\CreateWord\bin\Debug\rjkf.jpg

     文件      28672  2010-03-19 15:48  WordDemo\CreateWordDemo\CreateWord\bin\Debug\template\template.doc

     文件       8024  2011-08-23 14:00  WordDemo\CreateWordDemo\CreateWord\CreateWord.csproj

     文件        452  2011-08-21 22:27  WordDemo\CreateWordDemo\CreateWord\CreateWord.csproj.user

     文件      14622  2011-08-23 14:14  WordDemo\CreateWordDemo\CreateWord\Form1.cs

     文件      12129  2011-08-22 22:28  WordDemo\CreateWordDemo\CreateWord\Form1.Designer.cs

     文件       5814  2011-08-22 22:28  WordDemo\CreateWordDemo\CreateWord\Form1.resx

     文件       1417  2011-08-23 14:05  WordDemo\CreateWordDemo\CreateWord\Form2.cs

     文件       1927  2011-08-23 13:48  WordDemo\CreateWordDemo\CreateWord\Form2.Designer.cs

     文件       5817  2011-08-23 13:48  WordDemo\CreateWordDemo\CreateWord\Form2.resx

     文件       1137  2010-04-29 10:29  WordDemo\CreateWordDemo\CreateWord\obj\CreateWord.csproj.FileListAbsolute.txt

     文件      36352  2011-08-22 22:46  WordDemo\CreateWordDemo\CreateWord\obj\Debug\AxInterop.SHDocVw.dll

     文件       2121  2011-08-23 14:17  WordDemo\CreateWordDemo\CreateWord\obj\Debug\CreateWord.csproj.FileListAbsolute.txt

............此处省略58个文件信息

评论

共有 条评论

相关资源