Description
Appends the content of an existing article on the end of the current article. Only the elements that exist in both articles are merged.
Available in Ted and in Fred.
See MergeFromArticleEx to select to append on the beginning of the current article, or on the end.
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 |
object
Required. Object name. Returned by Ted.GetActiveArticle.
iId
Id of the source article. Can be obtained by Ted.ArticleSelectDlg.
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.MergeFromArticle(iId) <> 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