Solved

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

Posted on 2011-09-20
12
1,352 Views
Last Modified: 2015-08-27
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
0
Comment
Question by:j_a_jimenez
  • 6
  • 5
12 Comments
 
LVL 1

Author Comment

by:j_a_jimenez
ID: 36568050
.
0
 
LVL 17

Expert Comment

by:andrewssd3
ID: 36568065
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
 
LVL 1

Author Comment

by:j_a_jimenez
ID: 36568132
andrewssd3:

Yes from windows explorer is no problem, i even tried to recreate the template.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 17

Expert Comment

by:andrewssd3
ID: 36568167
What version of Word are you targeting, and what is the format of the template (.dot, .dotx, etc)?
0
 
LVL 1

Author Comment

by:j_a_jimenez
ID: 36568182
Word 2010, template is .dotx, Server Windows 2008 R2, IIS 7.5, .NET 4
0
 
LVL 17

Expert Comment

by:andrewssd3
ID: 36568243
Can you post the template?  All I can think of is to see if I can replicate the problem.
0
 
LVL 1

Author Comment

by:j_a_jimenez
ID: 36568266
Sure I'll post it, the text is in spanish is that a problem?
 ContratoVentaDIPSA.dotx ContratoVentaDIPSA.dotx
0
 
LVL 17

Expert Comment

by:andrewssd3
ID: 36568354
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
 
LVL 1

Accepted Solution

by:
j_a_jimenez earned 0 total points
ID: 36568366
No. The template was recreated from scratch in the server.
0
 
LVL 17

Expert Comment

by:andrewssd3
ID: 36568376
Sorry - I don't know what else to suggest
0
 
LVL 1

Author Closing Comment

by:j_a_jimenez
ID: 37805209
...
0
 

Expert Comment

by:KrisKul
ID: 40949964
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

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question