using System;
using System.Collections.Generic;
using System.Text;
using Word = Microsoft.Office.Interop.Word;namespace InsCaseCreateBase.WordAPI
{
public class WordOp
{
public static Object Nothing = System.Reflection.Missing.Value; private WordOp()
{
}
/// <summary>
/// 创建Word对像
/// </summary>
/// <returns></returns>
public static Word.Document GetDocument()
{
object Visible = true;
Word.Application app = new Word.Application();
app.Visible = false;
return app.Documents.Add(ref Nothing, ref Nothing, ref Nothing, ref Nothing);
}
}
本地测试没问题,上传后该方法返回NULL;
怎么回事?
using System.Collections.Generic;
using System.Text;
using Word = Microsoft.Office.Interop.Word;namespace InsCaseCreateBase.WordAPI
{
public class WordOp
{
public static Object Nothing = System.Reflection.Missing.Value; private WordOp()
{
}
/// <summary>
/// 创建Word对像
/// </summary>
/// <returns></returns>
public static Word.Document GetDocument()
{
object Visible = true;
Word.Application app = new Word.Application();
app.Visible = false;
return app.Documents.Add(ref Nothing, ref Nothing, ref Nothing, ref Nothing);
}
}
本地测试没问题,上传后该方法返回NULL;
怎么回事?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货