word操作
WordOperator
using System;
using System
using Microsoft
namespace CustomFileAccess
{
public class WordOperator
{
public void CreateWord()
{
Microsoft
Microsoft
Microsoft
Microsoft
object myNull = System
object strPath = HttpContext
object styleName =
try
{
wordDocument = wordApp
ref myNull
ref myNull
object start =
object end =
Microsoft
wordTable = wordDocument
wordTable
wordTable
wordTable
wordTable
wordTable
wordTable
wordTable
wordTable
wordDocument
wordDocument
wordDocument
wordDocument
wordApp
wordDocument
object myunit = Microsoft
wordApp
wordApp
wordApp
wordDocument
wordDocument
}
catch
{
wordDocument
wordApp
if (wordDocument != null)
{
System
wordDocument = null;
}
if (wordApp != null)
{
System
wordApp = null;
}
GC
throw new Exception(
}
finally
{
wordDocument
wordApp
}
}
}
}
From:http://tw.wingwit.com/Article/program/net/201311/13344.html