Skip the blank merge field on word document

hello there…
in my word.doc have an…

<<address1>>
<<address2>>
<<address3>>

when the merge field address2 were blank it will become like this…
No.5, Third Floor

Florda City
so…how can i skip this blank merge field so the <> will replace it or shift up…

Hi
Thanks for your inquiry. I think you should use RemoveEmptyParagraphs. Please see the following link for more information.
https://reference.aspose.com/words/net/aspose.words.mailmerging/mailmergecleanupoptions/
I hope this could help you.
Best regards.

hello there…
where i must put this statement…Doc.MailMerge.RemoveEmptyParagraphs = True
is it before mailmerge.execute of after…
nway…thanks for the reply…

Hi
Thanks for your inquiry. You should put this line before executing mail merge.
Best regards.

hi there…
i already try it…but it doesn’t work…
the coding i do is like this…

Public Function Execute(ByVal filterParameter As String, ByVal DocName As String, ByVal param1 As String) As Document
Dim srcDoc As Document = New Document("C:\DotNetProjs\RnD\RnDUI\DOC\" & DocName & ".doc")
Dim dstDoc As Document = srcDoc.Clone()
dstDoc.Sections.Clear()
Dim sqlStmt As String = "select......"
Dim pelesen As DataTable = Me.ExecuteDataTable(sqlStmt)
Dim i As Integer = 0
Do While i < pelesen.Rows.Count
Dim pelesenDoc As Document = srcDoc.Clone()
Dim pelesenRow As DataRow = pelesen.Rows(i)
pelesenDoc.MailMerge.Execute(pelesenRow)
Dim SqlStmt2 As String = "select......"
Dim SLA01 As DataTable = Me.ExecuteDataTable(SqlStmt2)
SLA01.TableName = "SLA01"
pelesenDoc.MailMerge.RemoveEmptyParagraphs = True
pelesenDoc.MailMerge.ExecuteWithRegions(SLA01)
AppendDoc(dstDoc, pelesenDoc)
i += 1
Loop
Return dstDoc
End Function

can you correct it for me if i’m wrong…thanks…

Hi
Thanks for your inquiry. RemoveEmptyParagraphs removes only empty paragraphs it does not remove empty rows from table.
I think the information provided in the following link could be useful for you.
Also please attach your document for testing.
Best regards.