Solved

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

Posted on 2011-09-20
12
1,325 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
 
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now