COMException (0x800A141F): Word was unable to read this document. It may be corrupt

Hi,

i'm trying to open a word template from a web page in my developer windows 7 visual studio 2010 enviroment everything works fine, but when i publish in the server i get this error:

COMException (0x800A141F): Word was unable to read this document. It may be corrupt

The line code is this one:

_doc = _app.Documents.Add(ref _templatename, ref missing, ref missing, ref missing);

Thanks
LVL 1
j_a_jimenezAsked:
Who is Participating?
 
j_a_jimenezConnect With a Mentor Author Commented:
No. The template was recreated from scratch in the server.
0
 
j_a_jimenezAuthor Commented:
.
0
 
andrewssd3Commented:
It must be a problem with the template named in ref _templatename.  Can you start a newWord  document from it  by double clicking on it in the normal way in Windows Explorer?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
j_a_jimenezAuthor Commented:
andrewssd3:

Yes from windows explorer is no problem, i even tried to recreate the template.
0
 
andrewssd3Commented:
What version of Word are you targeting, and what is the format of the template (.dot, .dotx, etc)?
0
 
j_a_jimenezAuthor Commented:
Word 2010, template is .dotx, Server Windows 2008 R2, IIS 7.5, .NET 4
0
 
andrewssd3Commented:
Can you post the template?  All I can think of is to see if I can replicate the problem.
0
 
j_a_jimenezAuthor Commented:
Sure I'll post it, the text is in spanish is that a problem?
 ContratoVentaDIPSA.dotx ContratoVentaDIPSA.dotx
0
 
andrewssd3Commented:
No, as you say, it seems to work fine for me and it's a perfectly valid 2010 template file.  I hate to admit defeat but I don't think I can help you - I can't see any other references to this sort of problem on the web.

The only other thing is, does something happen to the file during the publish process that causes it to be corrupt?
0
 
andrewssd3Commented:
Sorry - I don't know what else to suggest
0
 
j_a_jimenezAuthor Commented:
...
0
 
KrisKulCommented:
I know this is an old Topic, but i have the same Problem when i try to open a template with a SSIS package.

When I start the package over the Integration Services  it works. When I create a SQL Server Job which executes the SSIS package I get the error message, that the file could be corrupt.

Any idea, why it behaves like this?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.