asp.net控制word~~~~急 - .NET技术 / ASP.NET
我主要想控制下word保存的地址,但是编译不过去,总觉得是缺了using。。。
谢谢
代码如下:
using System;
using System.IO;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.OracleClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
//-------------------------------------------------
object Missing = Type.Missing;
string strTemp = "doc/test.doc";
string newFileName = "doc/test2.doc";
Application WordApp = new ApplicationClass();
//必须设置为不可见
WordApp.Visible = false;
try
{
//创建以strTemp为模板的文档
object oTemplate = Server.MapPath(strTemp);
Document WordDoc = WordApp.Documents.Add(ref oTemplate, ref Missing, ref Missing, ref Missing);
WordDoc.Activate();//这两个红色的地方都报错,缺少using
//保存为新文件
object oNewFileName = Server.MapPath(newFileName);
WordDoc.SaveAs(ref oNe
相关问答:
http://www.zgjhjy.com/Test/PrimaryTest/Index.aspx
就是类似以上的在线测试系统,需要有一个后台的,语言是asp的,数据库是access的,还需要能在后台对信息进行添删改查的。谢谢各位了。。。
程序真的很多,不知 ......
前段时间碰到一道面试题如下:
test.aspx页面有如下代码:
Response.Write(Test.GetDate());
Test类如下:
public class Test
{
static string dt="";
public static s ......
ASP.NET MVC架构发布了,你用了吗?
还在学习中
我也在学习。买书,听教程,看网上资料,下载例子,感觉听不错的,不过比起工厂模式,似乎逊色了点。。。欢迎到我博客互相学习
都用了5个版本了 从 PV1 到beta ......
<script type="text/javascript" src="js/Dialog.js"></script>
<script type="text/javascript">
function zOpenD()
{
va ......
哪里出错了,输出这样的结果??
<%@ Page Language="VB" AutoEventWireup="false" aspcompat="true" CodeFile="Default.aspx.vb" Inherits="_Default" %&g ......