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

Free Support Forum - aspose.com

INCLUDETEXT files

Hi,

I currrently have a system that performs a Merge (via ASPOSE word) then makes a call to a DLL (again this uses ASPOSE) to clean up the merged document (removeing empty rows etc). The master document is made of of 3 IF statements looking at a merge field and based on the value includes a wordd document (via MS Word INCLUDETEXT function) to ther merge. The output is then passed to the dll to clean up . Currently the DLL is returning what looks like the wron INCLUDETEXT file. Is there any way whereby want is pass to the DLL is the render result (ie alt F9 view off) and not alt F9 view..

Hi Timothy,

Thanks for your inquiry.
talba:
Is there any way whereby want is pass to the DLL is the render result (ie alt F9 view off) and not alt F9 view..
It would be great if you please share some more detail about your query along with following detail.

  • Please attach your input Word document.
  • Please attach your target Word document showing the desired behavior. You can use Microsoft Word to create your target Word document.
  • Please attach the output Word file that shows the undesired behavior
  • Please share your code which you have used to generate your output document

As soon as you get these pieces of information to us we'll start our investigation into your issue.

Hi,

I attached details as requested via your email request 3 days ago. Is there any please. I have attached to this the code used by the DLL, the output document produced by the calling programs which uses ASPOSE to perform the merge and before calling the DLL and the output after calling the dll

Hi Timothy,

Please accept my apologies for your inconvenience.


Unfortunately, I am unable to execute your code. It would be great if you please create a standalone/runnable simple application (for example a Console Application Project) that demonstrates the code (Aspose.Words code) you used to generate your output document.

I am afraid, I have not received any email. Could you please share the requested detail again?. You can share this detail via email using contact tab. Please see the attached image for detail.

Moreover, please also share the document used in INCLUDETEXT field.
talba:
Is there any way whereby want is pass to the DLL is the render result (ie alt F9 view off) and not alt F9 view…
It would be great if you please share some more detail about your query what exact you want to achieve by using Aspose.Words. We will then provide you more information about your query along with code.


Sorry but I do not have access to the code that generates the input (Ref: file that ends without.dll) and to provide a test harness requires a DLL that I will need permission to release. So given that my program is processing this file (without.dll and I cant change this) is there some function or method that I can use that allows me to reander the input file so all my program sees is what gets printed. I have attached the master document used together with the xml to produce the output file .without.dll

Hi Timothy,

Thanks for your inquiry. In case you are using an older version of Aspose.Words, I would suggest you please upgrade to the latest version (v14.3.0) from here and let us know how it goes on your side.

In your case, you can check IF filed results before calling the cleanup DLL as shown below. Hope this helps you.


Document
doc = new Document(MyDir + "in.Doc");

doc.UpdateFields();

foreach (Field field in doc.Range.Fields)

{

if (field.Type == FieldType.FieldIf)

{

Console.WriteLine(field.Result.ToString());

Console.WriteLine(field.GetFieldCode());

}

}


You need to set MailMerge.CleanupOptions before calling MailMerge.Execute.

  • Could you please share some detail about your DLL which perform the cleanup operation? Please share how you are removing the mail merge fields using this DLL.
  • It is difficult to say what is the problem with simplified application. Please create a standalone/runnable simple application (for example a Console Application Project) that demonstrates the code (Aspose.Words code) you used to generate your output document.
  • As per my understanding your cleanup DLL return the incorrect document. Please confirm this.
  • Please share the documents used in INCLUDETEXT fields

We are really keen to help you but need some more details from your side.

I Have installed version v14.3 but the code doesn't like Field and FieldType

Error message

Error 2 The name 'FieldType' does not exist in the current context C:\DocumentDLL\CheckForIFStatements\CheckForIFStatements\Program.cs 22 35 CheckForIFStatements

Error 1 The type or namespace name 'Field' could not be found (are you missing a using directive or an assembly reference?) C:\DocumentDLL\CheckForIFStatements\CheckForIFStatements\Program.cs 20 22 CheckForIFStatements

Please advise

Hi Timothy,

Thanks for your inquiry.

Please
first remove Aspose.Words completely from your system. Then remove the
reference to old Aspsoe.Word.dll from your project. Also,
delete associated files from your project’s bin folder if present. Then
install the latest version of Aspose.Word via msi installer. Add
reference to this new DLL in your project and re-build it. Please let us
know how it goes on your side. I hope, this will help.

PS: To
check version of the library, right click on the dll, select Properties
from the context menu, then select Details/Version tab. You will see
File version.