• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1450
  • Last Modified:

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
0
j_a_jimenez
Asked:
j_a_jimenez
  • 6
  • 5
1 Solution
 
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
 
j_a_jimenezAuthor Commented:
andrewssd3:

Yes from windows explorer is no problem, i even tried to recreate the template.
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
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
 
j_a_jimenezAuthor Commented:
No. The template was recreated from scratch in the server.
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

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now