Description
Appends the content of an existing article into the current one on the specified position (on the end or on the beginning). Only the elements that exist in both articles are merged.
See also MergeFromArticle.
Notes
•To merge also the structure (ie. to add to the the current article the elements of the source article or to make the structure identical) use ApplyArticleTemplate.
•This method does not merge article attributes.
Syntax
object.MergeFromArticle iId, MergeMethod |
object
Required. Object name. Returned by Ted.GetActiveArticle.
iId
Id of the source article. Can be obtained by Ted.ArticleSelectDlg.
MergeMethod
Method. 1=append on the end; 0=append on the beginning.
Remarks
This method expects the source article id as input parameter.
Merging is performed only if source and target element types are matching. The first source element of a type is appended into the first target element of the same type, the second into the second, etc.
Example
Public Sub MergeFromArticle()
'merges the content of the selected article and the current article
If Ted.HasActiveArticle Then
Dim objArticle = Ted.GetActiveArticle
Dim iId As Integer = UtilsBase.ArticleSelectDlg()
If iId > 0 Then
If objArticle.MergeFromArticleEx(iId, 1) <> 0 Then
MsgBox(My.Resources.IDS_ErrMergeFailed, vbCritical, My.Resources.IDS_Error)
End If
End If
End If
End Sub
Context
Article object
See also