Description
Links all the selected frames and pictures to the article.
Available in Fred.
Syntax
object.LinkSelected (nModify, bAtTop, bSelectImg) |
object
Required. Object name. Returned by Fred.GetActiveArticle.
nModify
0 = don't modify the article - ie the function fails if the modification of the article is required
1 = modify the article
2 = prompt the user to modify the article
bAtTop
true = link text frames as the first one in the linked text
false = link text frames as the last one in the linked text
Note that if an already linked frame is selected before an unlinked frame the unlinked frame is always placed in the sequence right after the already linked frame. This is the same behaviour of the 'standard' text link command.
bSelectImg
true = when linking a 'dummy for article' picture - and the article does not have any image not yet placed on page - prompt the user to chose an existing image to replace the 'dummy for article' one
false = when linking a 'dummy for article' picture - and the article does not have any image not yet placed on page - create automatically a dummy picture to replace the 'dummy for article' one
Remarks
Frames are linked to texts of their same type. If a frame does not have a type it is assumed to have the type of the current text or the last text encountered in the linking process. If there are no texts of a suitable type that can be linked to the frame (ie no text of the type or all the text of the type are already linked and do not support linking to multiple frames) a new text is added to the article.
If there are multiple text that can be linked to the frame Fred prompts the user to chose one - UNLESS one of the suitable texts is the current one or the last one found/created in the linking process, in this second case that text is used immediately.
'Real' pictures - ie pictures that are not 'dummy for article' - are associated with an article's text of their same type that do not reference yet a picture. If the picture does not have a type it is assumed to have the type of the current text or the last text encountered in the linking process. If there are no texts of the picture's type that do not already reference a picture a new text is inserted in the article. If there are multiple suitable texts the user is prompted to chose one - UNLESS one of the suitable texts is the current one or the last one found/created in the linking process, in this second case that text is used immediately.
'Dummy for article' pictures are replaced with a real picture and then associated with an article's text. The picture is selected between all the ones in the article with the same type and that are not already on a page. If there are no pictures available in the article the user is prompted to chose one or a new dummy picture is automatically created - depending on a parameter.
Attempts to link frames already linked or pictures already belonging to an article cause an error.
Returns 0 for success or an error code EFAILED (1202) or ECANCELLED (1013)
Example
If Fred.HasActiveArticle Then
Fred.GetActiveArticle.LinkSelected (2,false,false)
End If
Context
Article object
See also