We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Office File Validation problem with .doc generated

Hi everybody,

we are currently using Aspose.Words for Java 10.0.5 and, since last update to our office 2007 installations, we get this message every time we open a .doc file created with our application

Office File Validation detected a problem trying to open the file. Opening it may be dangerous.

Is it a problem in Aspose.Words itself, or do we need to configure something in our office installations to get rid of this message?

Thanks in advance.

Hi

Thanks for your request. Could you please attach the input and the output documents you are getting problem with? I will check it on my side and provide you more information.

Best regards,

Right now I can only attach the final document, I have no way to provide with the intermediate files right now.

EDIT: a little correction, this document was generated using both Aspose.Words for Jasperreports and Aspose.Words for Java

Hello

Thank you for additional information. I cannot reproduce the problem on my side using the latest version of Aspose.Words for Java 10.7.0.

In addition, we just released a new version of Aspose.Words. So it would be great if you try with the latest version. You can download it from here:

http://www.aspose.com/community/files/72/java-components/aspose.words-for-java/category1378.aspx

Best regards,

Sadly, our license expired some time ago, and we cannot renew it right now due to some difficulties our company is facing right now, so the last version we can use in our product is 10.0.5…

I’ll try to provide you with more information regarding this problem.

Hello

Thanks for your inquiry. Could you please attach your input document and code which will allow me to reproduce the problem on my side?

Also, could you please create a screenshot of the problem.

Best regards,

Here is the screenshot.

As I said, I cannot provide the input document and source code of the JasperReport template right now.

Hi

Thank you, I will wait for your additional information. Currently I cannot reproduce the problem on my side.

Best regards,

Hello,

I don’t mean to reopen a closed thread but I was wondering if this problem has been solved yet? My company is now receiving the same error on reports generated by Aspose. We are currently running Aspose Words 2.6 but are in the process of upgrading to the latest version. Have there been any other problems reported like this one in the newest version of Aspose Words for Java?






Thanks,

Michael Platt

Hi Michael,


Thanks for your inquiry.

I’m afraid no issue was ever found in this thread as we were unsuccessful in reproducing the error on our side.

Could you please explain the issue you are having and attach any input documents for testing?

Thanks,

Hello,

I don’t actually have an input document that I use. The software my company maintains actually creates the document with Aspose Words from scratch. The problem we are having is when it comes time to open said document. The software creates the document and give the user and option to download or open. When the open option is selected, the Microsoft Word Application starts and attempts to open the document. The Office File Validation pops up and warns the users that the document is probably dangerous to open and more than likely contains malware, trojans, etc… The users are working with Microsoft Office 2007 I believe and running Windows 7 as the OS. I believe the error may be caused by the fact that the document is being created and manipulated programatically but I’m not an Aspose/Microsoft expert.




Thanks,

Michael Platt

Hi Michael,


Thanks for this additional information.

That’s okay, instead could you please attach one of the output documents which demonstrates this issue when it’s opened in Microsoft Word?

Also if you could provide the code you use to save the document. I assume you are saving to a stream. If this is the case the error might occur because other data is being read in the stream after document save. This would be seen as a potential threat when the document is opened in Microsoft Word and could be the cause of the issue.

Thanks,

Hello Adam,

I don’t mean to be difficult but my company won’t allow me to upload code or reports generated from the code we use. The code is saving to a byteArrayOutputStream so I will go in and check to make sure the stream is closing properly and no other data is being added once the document is created. Sorry again for this being so difficult with being unable to show you the code and documents. I appreciate all the help though.



Edit: Minor correction. The document is being saved to a directory via the .save() command, not by turning it into a stream first.


Thanks,

Michael

Hi Michael,


Thanks for this additional information and I apologise for the late reply.

I’m afraid it’s very hard to find out the reason for the issue without the input documents. Can you test the same document on a different machine and version of Microsoft Word and see if the issue still occurs?

Thanks,