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

Free Support Forum - aspose.com

MailMerge and Mark up

1)

Is there a way to remove mark up from a Save?

I am getting all the red, underlined markup from the template when doing a MailMerge and saving as PDF.

2)

Also, I am getting an extra blank page. Is there a way to remove this also?

Hi Geoff,

Thansk for your inquiry.

G Webb:

1) Is there a way to remove mark up from a Save?

Please use Document.AcceptAllRevisions method to accept all tracked changes in the document. Following code example shows how to accept all tracking changes in the document.


Document doc = new Document(MyDir + “Document.doc”);

doc.AcceptAllRevisions();

<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![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-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:8.0pt; mso-para-margin-left:0in; line-height:107%; 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]–>

G Webb:

2) Also, I am getting an extra blank page. Is there a way to remove this also?

Could you please attach your input Word document here for testing? I will investigate the issue on my side and provide you more information.

So, Document.AcceptAllRevisions removes all markup?

I think the markup is pushing the conversion from DOC to PDF to a new page.

I need to make sure that the markup is removed.

1) Does Document.AcceptAllRevisions remove all markup?

Within the attached document, you will notice that there are two <> mail merge fields. One of which is in the markup. When I merge them, there is an extra <> tag shown as text... Again, I need make sure that mark-up is removed.

2) What is causing the extra page?

Hi Geoff,

Thanks for your inquiry.

G Webb:

1) Does Document.AcceptAllRevisions remove all markup?

Yes, Document.AcceptAllRevisions method accepts all tracked changes in the document.

I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-11175. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.
G Webb:

2) What is causing the extra page?

In case you are using an older version of Aspose.Words, I would suggest you please upgrade to the latest version (v14.11.0) from here and let us know how it goes on your side. If the problem still remains, please share following detail for investigation purposes.

  • 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

  • Please attach the output Pdf file that shows the undesired behavior.

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

The attached PDF shows the "extra" mark-up mail-merge field <> that was not removed, yet the field just above it, shown "replaced" in bold, was the original or correct <> and correctly merged.

1st large paragraph starting with "We", notice the bold ABC Finance Company..., that is the correct and original <> merge field.

Thanks

Let me know when this will be fixed. I hate to have to tell users that give us mail merge templates that if there is mark up that contained/contains a merge field, it wont work...

Hi Geoff,

Thanks for your inquiry. We will update you via this forum thread once this issue is resolved. As a workaround of this issue, please replace «Description» with empty text as shown in following code example. Hope this helps you.


Document doc = new Document(MyDir + “20141204152521_1965_Template.docx”);

doc.AcceptAllRevisions();

//Mail merge code...

//....

doc.Range.Replace("«Description»", "", false, false);


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


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