Free Support Forum - aspose.com

Aspose.Word update fields can not keep formating

Hi:

Recently i am working on the IF Fields a lot to help my client improve their letter template, as the new version of aspose. word to support IF Fields, this is really a good news for me. but i just found out there is a problem here, if my IF Fields is like:

{IF {MERGEFIELD field}=“True” “The Field is True” “The Field is False”}

after the letter is mail-merged and fields updated by aspose. the if field is evaluated, but the format of the test just gone. and i need to right click on the field and update it again, so i can get the formatting back. is this a bug? or there is a way i can keep the formatting.

Thanks and Regards

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

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 fixed. The problem occurs because there should be white spaces before and after comparison operator

{ IF field = True "The Field is True" "The Field is False" \* MERGEFORMAT}

Best regards,

I also managed to reproduce the problem with formatting. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Best regards,

AndreyN:

Hi

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 fixed. The problem occurs because there should be white spaces before and after comparison operator

{ IF field = True "The Field is True" "The Field is False" \* MERGEFORMAT}

Best regards,



Hi:

Thanks for all ur reply, can i know what is the meaning by there should be white spaces before and after comparison operator,do you mean if you put the space before and after the comparison operator then the format will be correct after field update? hmm.. i did the test just now.. but the color and the bold still not there.. plz advice me..thanks.

Hi:

Another relevant question, other than formatting of the text i tried to put tables into the IF ELSE fields which is supported by word, after it evaluated by aspose. it give me error of "<!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} table.MsoTableGrid {mso-style-name:"Table Grid"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-priority:59; mso-style-unhide:no; border:solid black 1.0pt; mso-border-themecolor:text1; mso-border-alt:solid black .5pt; mso-border-themecolor:text1; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-border-insideh:.5pt solid black; mso-border-insideh-themecolor:text1; mso-border-insidev:.5pt solid black; mso-border-insidev-themecolor:text1; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

<![endif]–>

Error! Unknown op code for conditional.

"

my field is like:

<!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} table.MsoTableGrid {mso-style-name:"Table Grid"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-priority:59; mso-style-unhide:no; border:solid black 1.0pt; mso-border-themecolor:text1; mso-border-alt:solid black .5pt; mso-border-themecolor:text1; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-border-insideh:.5pt solid black; mso-border-insideh-themecolor:text1; mso-border-insidev:.5pt solid black; mso-border-insidev-themecolor:text1; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} table.MsoTableGrid {mso-style-name:"Table Grid"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-priority:59; mso-style-unhide:no; border:solid black 1.0pt; mso-border-themecolor:text1; mso-border-alt:solid black .5pt; mso-border-themecolor:text1; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-border-insideh:.5pt solid black; mso-border-insideh-themecolor:text1; mso-border-insidev:.5pt solid black; mso-border-insidev-themecolor:text1; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

<![endif]–>
{IF {MERGEFIELD field} = “TRUE”
"
<!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} table.MsoTableGrid {mso-style-name:"Table Grid"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-priority:59; mso-style-unhide:no; border:solid black 1.0pt; mso-border-themecolor:text1; mso-border-alt:solid black .5pt; mso-border-themecolor:text1; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-border-insideh:.5pt solid black; mso-border-insideh-themecolor:text1; mso-border-insidev:.5pt solid black; mso-border-insidev-themecolor:text1; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

<![endif]–>

ABC

ABC

ABC

ABC

ABC

ABC

ABC

ABC





<span style=“font-family: “Times New Roman”,“serif”;”>BCD

BCD

BCD

BCD

BCD

BCD

BCD

BCD


"
}

is there a way i can make it working wiz aspose?

thanks a lot

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. Sorry for confuse with “white spaces after and before comparison operator” I only suggest you to use this format but you are right this does not resolve the problem with text formatting. I managed to reproduce this problem on my side, also I managed to reproduce the problem with tables inside IF field. Your request has been linked to the appropriate issues. You will be notified as soon as the problems are fixed.

Best regards,

Thanks for replying… is there any estimation that when this issue will be able to be resolved?

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Currently, it is difficult to promise you something regarding this issue. Please expect a reply before the next hotfix (within 4-5 weeks). We might just fix the problem by then or provide you more information.

Best regards,

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


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

Hi:

thanks for update me on this, i have just tested it, but it looks that my problem does not really fixed.

i have put down the merge field in my word template like:

{IF {MERGEFIELD field} = “True” “The Field is True” “The Field is False” /*MERGEFORMAT}

there are space before and after the equal sign, and after it is processed by latest aspose.word which is 8.0. the format is still lost.

and i got the same error code if i put table inside.

please advice, thanks.

Hi,

Actually the update was about the issue 10628 which is the "spaces before and after the operator" issue and which is fixed in 8.0. The "preserve formatting" issue is fairly complicated one and requires some time to resolve. We have just started working on it extensively and we hope to get it completely resolved in a few weeks.

Thanks.

Ok, i see, thanks for reply. Do keep me updated if it is fixed, thanks for all the hardworking.

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


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