Morning Tahir,
Back ground details which I think will explain where I am comming from:
We currently have a .Net window service which reads an XML files and merges it with a MS Word template by making calls to Microsoft Word routines (MERGE etc). Once the merged has completed the document is then passed to my program to do the following using MS Word functions:
Change to carriage return
Change /BS/vvvvv/BE/ to bold characters
Delete empty rows in tables.
Insert banding details into headers and footers
Return the document back to the service for archiving and printing/email/FTP etc
Our development team (which I am not part of) have developed a new version of the service using ASPOSE.NET and my job is to write a new DLL to perform the same functions above. Now I have good working knowledge of MS Word but not of ASPOSE.WORD
With the MS Word templates the users user formulas, IF statement, merge fields etc. With some of the formulas they are merge fields whcih contain a strinf numeric value (ie leading spaces)
example: { = 200.00 + ' 125.55' + 250.00}
With Word, the MERGE functiona handles this and returns a valid formula from the MERGE. With ASPOSE.WORD it would appear it doesn't and as a result we get Field Error (Sorry but I was not and so I need to update the formula so that it does work. Now if the formula is in a Table cell it is very easy to do but if it is the text of the document I have difficulties. With limited knowledge I have used NodeCollection (
GetChildNodes(NodeType.Run, true);
to loop around the document and handle them that way, but this doesn't return the complete formula and I am having to write code to build up the formula and then replace the string field and it works I feel there must be a better way of doing this.
The other issues I have is that with word MERGE the IF staement is evaluated and the result is returned in the merged document and not the IF statement. With ASPOSE it seems to return the IF statement witth the values (which you can see via the alt F9 function)
{IF 0 > 0 "true"}
This means that if a table cell has an IF statement in it I have to evalute it in order to determine if the row is blank and I can delete it. Again I hhave written code to handles this and it works but is there a way whereby the merge functions reaults just the result and not the evaluated IF statement
Many thanks for your help
Tim