Add specific internet link to favorites and then send email to specific email add - heading LINK ADDED ,tru Outlook mail

Hi ,

Can i make an excel button, on the click of which the link EXCELEXPERTS.COM will be added to my favorites and sending an email(outlook) to ABC@EXCELEXPERTS.COM heading LINK ADDED.

Please anyone can help.....

Regards
Ruth

AttachmentSize
AddBookmarkto_IE_VBA.xlsm20.69 KB
AddBookmarkto_IE_VBA.xls43.5 KB

Thank you very much Nick

Thank you very much Nick ,you are very helping.
I gotta test it today ,....

Thanks and Regards
Ruth

Thank you very much, Nick 2003

Can i thank you Nick for this help , but i m unable to run this excel module/button in Excel 2003?

Can you please make this running in MS Excel 2003?

Another solution to add link

Hi,

I want to suggest another solution to add link with the following subroutine.

Note: Before run the code look at into VBE menu Tools -> References... whether Microsoft Scripting Runtime is checked.

Here's the subroutine:

' ************************* ' ************************* '

Sub AddLinkToFavorites(strLinkAddress As String, strLinkName As String)

    Dim strFavoritesPath As String
    Dim strFilePath As String
    Dim oFileSystem As FileSystemObject
    Dim oTextStream As TextStream

   
    On Error GoTo ERROR_HANDLER
   
    strFavoritesPath = Environ("USERPROFILE") & "\Favorites\"
    strFilePath = strFavoritesPath & strLinkName & ".url"

   
    Set oFileSystem = New FileSystemObject
    Set oTextStream = oFileSystem.CreateTextFile(strFilePath)

   
    oTextStream.WriteLine Text:="[InternetShortcut]"
    oTextStream.WriteLine Text:="URL=" & strLinkAddress
    oTextStream.Close

EXIT_SUB:
    Set oTextStream = Nothing
    Set oFileSystem = Nothing

   
    Exit Sub

ERROR_HANDLER:
    ' Some code for error handling
    Err.Clear
    GoTo EXIT_SUB

End Sub

' ************************* ' ************************* '

 

You can call it, for example:

' ************************* ' ************************* '

Sub Main()

    Const LINK_ADDRESS As String = "http://www.excelexperts.com"
    Const LINK_NAME As String = "ExcelExperts"

   
    Call AddLinkToFavorites(LINK_ADDRESS, LINK_NAME)

End Sub

' ************************* ' ************************* '

or from a Button_Click event.

 

Best regards.

thanks , can you insert it inside excel button made in 2003

hi, can you insert and tag it here that excel 2003 file containing that button you instructed for?

Nick's picture

love the concept... ; -

But my main task is to add EXCELEXPERTS.COM to favrouts

Thanks Nick for help. but my main task is yet to be answered , at the click of that button the link or internet site address EXCELEXPERTS.COM NEEDS TO BE ADDED TO FAVORITES.

Thanks and Regards
Ruth

Nick's picture

ok.. added to favorites where

ok.. added to favorites where ?
Google Chrome ?... IE ?

tks

To Internet Explorer...

waiting for answer ...

Thank you Sir...

Ruth

Nick's picture

Have a play:

Have a play: AddBookmarkto_IE_VBA.xlsm added to your post

Thank you very much, Nick 2003

Can i thank you Nick for this help , but i m unable to run this excel module/button in Excel 2003?

Can you please make this running in MS Excel 2003?

AddBookmarkto_IE_VBA.xlsm =>2003

Ruth