Results 1 to 1 of 1

Send hyperlink of workbook to selected Outlook User Groups - UserForm?

Threaded View

  1. #1
    Registered User
    Join Date
    11-16-2010
    Location
    Stratford, WI
    MS-Off Ver
    Excel 2003
    Posts
    49

    Send hyperlink of workbook to selected Outlook User Groups - UserForm?

    Hi,

    I have created VBA to email a hyperlink to my spreadsheet. What I am looking to do now is be able to pick certain Outlook Distribution Groups to e-mail to? I have created a UserForm and the VBA but I am not sure how to put them together?

    The code is as follows:
    Sub EMail_Link()
        Dim OutApp As Object
        Dim OutMail As Object
        Dim strbody As String
        
        If ActiveWorkbook.Path <> "" Then
            Set OutApp = CreateObject("Outlook.Application")
            Set OutMail = OutApp.CreateItem(0)
    
            strbody = "<font size=""3"" face=""Calibri"">" & _
                      "<A HREF=""file://" & ActiveWorkbook.FullName & _
                      """>""" & ActiveWorkbook.FullName & _
                      """ </A>" & _
                      "<br><br>Thank you!"
    
            On Error Resume Next
            
            With OutMail
                .Display
                .To = ""
                .CC = ""
                .BCC = ""
                .Subject = "**NEW WORK ORDER - " & Sheets("Work Order").Range("C9").Value & " " & Sheets("Work Order").Range("C4").Value
                .HTMLBody = strbody & "<br>" & .HTMLBody
                .Display   'or use .Send
            End With
            On Error GoTo 0
    
            Set OutMail = Nothing
            Set OutApp = Nothing
        Else
            MsgBox "The ActiveWorkbook does not have a path, Save the file first."
        End If
    End Sub
    I have attached the spreadsheet that has the UserForm started.

    Any help would be greatly appreciated!

    Thank you,
    Sandi
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Send Outlook Task to more than one user
    By rgolob in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2013, 03:05 PM
  2. [SOLVED] send attachment selected in userform to a specific cell
    By jjyoung in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2013, 04:14 PM
  3. Excel Hyperlink send email draft via outlook
    By Sithorce in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-31-2013, 10:37 AM
  4. Send Userform data to selected row
    By revenge4ash89 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2012, 05:09 AM
  5. Cannot send out Excel workbook through Outlook Express
    By Abel Chan in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-07-2005, 12:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1