DOTM read Write DOCX.. error opening file

Hi,
Using the latest version for .NET, when a DOTM is read … I am getting an error opening the file in Office 2010 when saving to a DOCX document. Will Aspose.Words know that this is changing the capabilities of the document or should I restrict this type of conversion.
I’ve attached the DOTM file and the resulting DOCX file that cannot be opened by Office 2010.
Thanks in advance!
Regards, Bruce

Hi
Thanks for your request. Unfortunately, I cannot reproduce the problem on my side. I used the following code for testing:

Document doc = new Document(@"Test001\tplKPN-PB.dotm");
// You have to remove macros before saving the document as DOCX.
doc.RemoveMacros();
doc.Save(@"Test001\out.docx");

Do you perform some processing of the document in your code before saving or after saving? Could you please create a simple code that will allow me to reproduce the problem? I will check the issue and provide you more information.
Best regards,

Hi,
Once again, answer is perfect!! I can .RemoveMacros or check if the document .HasMacros.
Just to check on the MS Word conventions … Does the extension .DOCX imply ‘no macros’ and is the extension .DOCM the only extension that allows macros (other than DOTM).
Regards, Bruce

Hi Bruce,
Thanks for your inquiry. DOCX, DOTX and FlatOpc (Word 2007 XML) are macro free formats. All other MS Word formats DOCM, DOTM, DOC, RTF, WML (Word 2003 XML) can contain macros.
Best regards,

Hi,
Many thanks. I’ve added the protection for converting DOCM to DOCX. However, this was not the line that caused the problem as the macro test returned false. This is with Word 2010.
I also set the following in the options object… when I removed this line the file works

pdcxOptions.Compliance = Saving.OoxmlCompliance.Iso29500_2008_Transitional

(NOTE: I thought this might be useful?? - I no longer include this).
This should fail to open in Word 2010 given the samples provided. I don’t know if this is actually a problem - however, I will not be using the compliance option - until someone asks.
Regards, Bruce

Hi Bruce,
Thank you for additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.
Best regards,

The issues you have found earlier (filed as WORDSNET-4835) have been fixed in this .NET update and in this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(4)