Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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;
}
}
Posted
Comments
amit_83 22-Mar-12 6:39am    
Every thing is installed on my machine, but still problem.

The first thing I would check is: do you have Word installed on your server...
 
Share this answer
 
Comments
amit_83 22-Mar-12 6:39am    
Every thing is installed on my machine, but still problem.
OriginalGriff 22-Mar-12 6:45am    
Yes, but is it installed on the server that runs the code? What is installed on the client is irrelevant...
amit_83 22-Mar-12 8:21am    
Interop.word and office both library are installed on my development as well as iis server, but still problem at when i run app from iis.
You need the word interop dlls as explained here[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900