Free Support Forum - aspose.com

Issue on inserting a TC field

Hi 2 all

We are investigating the word component and we can not really insert a new TC field.

When the TC field is generated in document, field's value is visible. But it is expected to be invisible.

Could you advise us how to avoid this issue or what work arround should be done?

Sincerely Sergiu

Just make sure you use the latest version of Aspose.Words. Proper inserting of TC fields was introduced only a few releases ago.

We have the latest version of Aspose.Words.dll - 3.5.1.0

I've downloaded again, the last evrsion of Aspose.Words.dll , just to be sure. The issue dose not disapear.

Perhaps the way we insert the TC field is wrong...

Here is the code:

builder.InsertField("TC ", "\"My test FIELD \"");

And the Word report rezult is: |"My test FIELD"

Perhaps my previous explanation was not absolutely clear

In the TOC element the "My Test FIELD" appears as expected, but on the page where the TC field is inserted, this field is shown on the screen, but as I said it shouldn't be visible.

Yes, you should not providde the field name as a second parameter. Instead the code should look like this:

builder.InsertField(@"TC ""Tag Data"" \l 2", null);

Thank you!!! It works :)

Now, when I'm realy close to finish Aspose component investigation , I've descovered another issue, about digital signature of VBA project.

I tryed to create a template document. In this template I've defined a macros, Document_Open event to ensure the TOC rendering.

In order to run this macros i've signed the VBA project.

When I've created a new document based on this template via Aspose.Word, the Document_Open macros dose not fire because the project became unasigned.

Could you help me on this issue?

That is a known issue with Aspose.Words:

http://www.aspose.com/wiki/default.aspx/Aspose.Words/MacrosIssues.html

Same thing happens when working with Open Office. The reason is that this feature of MS Word is completely undocumented. We may correct it eventually but I cannot provide any timeframe right now.

Sorry, but I've found 2 posts in the forum where romank said:

Digital signature on VBA projects is fully preserved in Aspose.Word 2.1.1, for more info see http://aspose.com/blogs/Roman.Korchagin/archive/2005/01/05/379.aspx.

1-st post http://www.aspose.com/Community/Forums/13686/ShowPost.aspx

2-nd http://www.aspose.com/Community/Forums/11086/ShowPost.aspx

Digital signature is preserved. It is Document_Open event that stops firing somehow.

Hi!

Thanks for your support

We have resolve the TOC generation issue by writing signed macros in the dot which is put on a web server. In this case the Document_Open event is fired as it dose.

Hope our client will enjoy our solution based on Aspose.Words component.

Good louck and thanks again for support.

Sincerly Sergiu.