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

Free Support Forum - aspose.com

Content controls in docx

Dear Sir or Madam,

I have a problem converting docx files with Content Controls (Structured document Tags).
They dissapear in the resulting document.
I have read in the forums that it this is an old issue (#4295 if I’m right).

Can you tell me please if this feature will be supported any time soon ?
Is there any workaround ?
For example do you know a way to convert docx to doc without running MS Word ?

Thanks in advance,

Darko

Hello Darko,

Thanks for your request. Yes you are right; currently Aspose.Words does not support Structured Document Tags (Content Controls). Your request has been linked to the appropriate issue. You will be notified as soon as this feature is available.

Hopefully, this feature will be supported somewhere in the end of this year, but I cannot provide you a more solid estimate at the moment.

The only way to convert Docx to Doc I can suggest you at the moment is using Aspose.Words.

Best regards,

Using Aspose is not a solution, because I loose data in Content controls.

Is it possible to replace content controls with their content(text) programmaticaly ?
In my case, text for content control is retreived from custom xml attached to docx.
Only after raplacing content control with text from custom xml I will be able to use Aspose.Words to convert to another format.

I would appreciate if you can give me some code example of how to do this.

Regards

Hello Darko,

Thanks for your inquiry. Could you please attach your document here for testing? I will investigate the problem on my side and provide you more information.

Best regards,

Yes of course.

Here is example docx with only one content control showing ‘Test parametra Annuity’.

Best regards,

Hello

Thank you for additional information. I can successfully convert your document to DOC and PDF without losing any content. The content inside content control was fully preserved.

I use the latest version of Aspose.Words 9.0.0 for testing. The latest version you can download here:

http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx

Best regards,

My mistake - wrong file.
Please try with this one.

The difference is that in previous file, text is embedded directly into content control.
In the new file, there is only a data binding to embedded xml.
Content control is empty, but when you open document in Word, content is loaded from xml and displayed properly.
That is the case when Apose does not convert document correctly.

Regards

Hello

Thank you for additional information. Currently I cannot suggest you any way to work this problem around. You should just wait for the resolution of the original issue.

Best regards,

The issues you have found earlier (filed as 4295) have been fixed in this update.


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

This feature don’t seems to be working either il the linked 9.4 version than in the 10 version, at least in demo mode. Is this a demo mode limitation?

I’m attaching the docx, as well as the result pdf

Here is the code:

static void Main(string[] args)

{

Document doc = new Document(@“C:\Users\marceb\Desktop\tmp202.tmp.docx”);

doc.Save(@“C:\Users\marceb\Desktop\tmp202.tmp.pdf”);

}

Any clue?

Thanks

Marcello

Hello Marcello,

Thank you for your question. It is not evaluation version limitation. The problem occurs because rendering of DrawingML is not yet fully supported by Aspose.Words product. Currently our development team works to implement fully support of DrwaingML. We plan to release some workable features by the end of this month. I linked your request to the appropriate issue. You will be notified as soon as this feature is supported.

Best regards,

darkor71:

Is it possible to replace content controls with their content(text) programmaticaly ? In my case, text for content control is retreived from custom xml attached to docx.
Only after raplacing content control with text from custom xml I will be able to use Aspose.Words to convert to another format.

@darkor71: I’m needing to do the exact same thing. One of the issues is that Custom XML is a deprecated feature in Word because of the lawsuit from i4i (Google it). I was thinking about spinning my own solution by embedding tags in the document (something like [[fieldname]]) and then replacing them in the document.xml in the .docx. This would be relatively easy to do.

If you’re interested in collaborating on something like this let me know. I really need to get this worked out.

Hi Matt,

Thank you for your interest in Aspose.Words. I think, if you need to fill a document with data, mail merge would be the best option. Please see the following link for more information:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/simple-mail-merge-explained.html

Best regards,

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


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