导航

最近一直在做C#操作office方面的工作!总结一下!Word(二)

Posted on 2004-08-19 08:23  wngwz  阅读(11562)  评论(12编辑  收藏  举报
C#操作Word!
namespace ImportExportToOffice
{
    
using System;
    
using System.ComponentModel;
    
using System.Data;
    
using System.Windows.Forms;
    
public class ImportExportToWord
    
{
        
private Word.ApplicationClass oWordApplic;    
        
private Word.Document oDoc;        
        
private const string strFileName    = @"F:\";
        
private const string PostfixForWord    = @".doc";
        
private const string PostfixForHtml    = @".Html";

        
构造函数

        
public Word.Document Document
        
{
            
get
            
{
                
return this.oDoc;
            }

        }


        
public Word.ApplicationClass Application
        
{
            
get
            
{
                
return this.oWordApplic;
            }
    
        }
 

        
私有方法 

        
公有方法
    }

}