Hyperlink.AddToFavorites Method (Access)
The AddToFavorites method adds a hyperlink address to the Favorites folder.
Syntax
expression .AddToFavorites
expression A variable that represents a Hyperlink object.
Return Value
Nothing
Remarks
When applied to a Control object, the AddToFavorites method adds the hyperlink address contained in a control to the Favorites folder.
Example
The following example sets the HyperlinkAddress property of a command button. When the user clicks the command button, the address is added to the Favorites folder by using the AddToFavorites method.
To try this example, create a new form and add a command button named Command0. Paste the following code into the form's module. Switch to Form view and click the command button.
Private Sub Form_Load()
Me!Command0.HyperlinkAddress = "https://www.microsoft.com/"
End SubPrivate Sub Command0_Click()
Me!Command0.Hyperlink.AddToFavorites
End Sub