问题描述
大家好,
当我创建
时,我正在我的应用程序中创建单词实例在我的开发环境中使用实例一词,然后一切正常.
但是当我在iis中创建安装程序和主机时,
当我从IIS运行应用程序时,出现错误提示
System.FormatException:索引(从零开始)必须大于或等于零且小于参数列表的大小.
我应该怎么做才能解决此问题?
代码:
public void Open(){
尝试{
//通过使用内联初始化来创建Word应用程序.
Microsoft.Office.Interop.Word.Application _oApplication =新的Microsoft.Office.Interop.Word.Application();
_oApplication.NormalTemplate.Saved = true;
}
catch(Exception e){
抛出e;
}
}
Hi All,
i am creating the word instance in my application, when i am creating
the word instance at my development environment then everything work ok.
but when i create the setup and host in iis,
when i run the application from iis then fallowing error come
System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
what should i do to resolve this issue?
Code:
public void Open() {
try {
// Create the Word application by using inline initialization.
Microsoft.Office.Interop.Word.Application _oApplication = new Microsoft.Office.Interop.Word.Application();
_oApplication.NormalTemplate.Saved = true;
}
catch(Exception e) {
throw e;
}
}
推荐答案
这篇关于创建单词实例给错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!