Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Wed Jun 08, 2011 8:55 am

Hello,
the creation of Word files (DOC) using your component works like a charm.

But unfortunately opens MS Word any of these files in Protected Mode only telling me they are malicious. This is rather bad for our customer as they do not like to see this message.
What can be done to avoid this?

Thank you in preface.

Peter

pbernhardt
 
Posts: 11
Joined: Thu Mar 03, 2011 1:55 pm

Thu Jun 09, 2011 1:45 am

Dear Peter,
Thanks for your inqury.
Maybe you used Word 2007 or later. If so,when you open/save an docx file, you should explicitly specify the file format to docx.For instance:
Code: Select all
.....
document.SaveToFile("Sample.docx",FileFormat.Docx);
Last edited by Justin Weng on Fri Jun 10, 2011 10:14 am, edited 1 time in total.
Justin
Technical Support / Developer,
e-iceblue Support Team
User avatar

Justin Weng
 
Posts: 110
Joined: Mon Mar 28, 2011 5:54 am

Fri Jun 10, 2011 9:34 am

Hello,
we already did of course specifiy the output file format to ".doc" in the SaveToFile method. We are using MS Word 2010. The previous versions of Word that do not have the protected view naturally do not show any error.

For trials we completely switched to the DOCX file format, which we cannot use in production as our client still uses Word 2003. But nevertheless, when we said FileFormat.Docx the created files could not be opened in Word 2010 at all! The only thing that is shown by Word is an error message saying that the content of the file is "making problems" detailing that the namespace "xmlns:xml" is reserved and can only be declared as "http://www.w3.org/XML/1998/namespace". I've attached the error message (unfortunately in German).

The output of the component in RTF is not usable at all (completely out of order in content and layout). The output as PDF is a bit better but still incomplete and with the wrong formatting. This overall behaviour of the component is a bit disappointing. It looks like the DOC format is the only usable file format of all except the problem with the protected view.

Peter

pbernhardt
 
Posts: 11
Joined: Thu Mar 03, 2011 1:55 pm

Fri Jun 10, 2011 10:14 am

Dear Peter,
Thanks for your inqury.

Please check you are using the latest version http://www.e-iceblue.com/Download/download-word-for-net-now.html.
If not, please test that again.

If there are still problems, please upload your code and file. So we can reproduce the problem and fix it.

Sorry for inconvenience.
Justin
Technical Support / Developer,
e-iceblue Support Team
User avatar

Justin Weng
 
Posts: 110
Joined: Mon Mar 28, 2011 5:54 am

Return to Spire.Doc