日期:2014-05-17 浏览次数:20476 次
public void show()
{
object Nothing = System.Reflection.Missing.Value;
Word.ApplicationClass wordAppObj = null;
Word.Document WordDoc = null;
try
{
// object srcFileName = Server.MapPath("Documnets") + "/ProjectTmp.doc";
// object dstFileName = Server.MapPath("Documnets") + "/Project.doc";
string FileName = Server.MapPath("~/UpLoad") + "/water.gif";
object srcFileName = "C:\\公司框架.doc";
object dstFileName = "C:\\公司框架.doc";
object obj = true;
wordAppObj = new Word.ApplicationClass();
WordDoc = wordAppObj.Documents.Open(ref srcFileName, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing);
this.CreateWaterMarkImg("与电子文本一致", WordDoc.ActiveWindow.Height, WordDoc.ActiveWindow.Width, WordDoc.ActiveWindow.Width, WordDoc.ActiveWindow.Height);
Word.Shape oShape;
WordDoc.ActiveWindow.View.Type = Word.WdViewType.wdOutlineView;
WordDoc.ActiveWindow.View.SeekView = Word.WdSeekView.wdSeekPrimaryHeader;
// WordDoc.ActiveWindow.ActivePane.Selection.InsertAfter(DateTime.Now.ToString("yyyyMMddhhssmm"));