+ Reply to Thread
Results 1 to 4 of 4

Email multiple ranges to multiple email addresses

  1. #1
    Forum Contributor myobreportguru's Avatar
    Join Date
    09-18-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2016
    Posts
    231

    Email multiple ranges to multiple email addresses

    Hi

    I have installed Ron De Bruin's excel ad in RDBMail.xlam which can be found at http://www.rondebruin.nl/win/addins/rdbmail.htm. There is a menu option that creates a "send PDF template". Column B in this template is for adding worksheets or workbooks. I would like to add a range name in these cells instead if I can and everything would run perfectly but I can't work out how to do this. I realise there's going to be some vba changes to do this. I would appreciate it if somebody could help me. Thanks.

  2. #2
    Forum Contributor myobreportguru's Avatar
    Join Date
    09-18-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2016
    Posts
    231

    Re: Email multiple ranges to multiple email addresses

    I think this is the code where it's looking for a sheet name in column B. Can we change this to looking for a range name.

    'Check if there are Sheet names in column B

    'If B is empty S = 0 so you not want to send a sheet or sheets as pdf
    If Trim(Me.Cells(myCell.Row, "B").Value) = "" Then S = 0

    'If there are sheet names in the B column S is the number of sheets it add to the Array
    If LCase(Trim(Me.Cells(myCell.Row, "B").Value)) <> "workbook" Then
    StringSheetNames = Me.Cells(myCell.Row, "B").Value
    SheetNamesArray = Split(StringSheetNames, Chr(10), -1)

    For I = LBound(SheetNamesArray) To UBound(SheetNamesArray)
    On Error Resume Next
    If SheetNamesArray(I) <> "" Then
    If SheetExists(CStr(SheetNamesArray(I))) = False Then
    Me.Cells(myCell.Row, "B").Interior.ColorIndex = 3
    WrongData = True
    Else
    S = S + 1
    ReDim Preserve ShArr(1 To S)
    ShArr(S) = SheetNamesArray(I)
    End If
    End If
    On Error GoTo 0
    Next I

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Email multiple ranges to multiple email addresses

    @myobreportguru

    Please post your code in tags # (according to the forum rules).
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Forum Contributor myobreportguru's Avatar
    Join Date
    09-18-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2016
    Posts
    231

    Re: Email multiple ranges to multiple email addresses

    Sorry about that, I've just learnt something. I have now added all the code and I think the portion that needs to be changed is under 'Check if there sheet names in column B'





    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Multiple email addresses in a cell for email merge use
    By selinaang3012 in forum Excel General
    Replies: 0
    Last Post: 03-11-2013, 05:59 AM
  2. email excel file or worksheet as an attachment to multiple email addresses
    By jgeagle5 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-16-2009, 03:40 PM
  3. Sending an email from Excel to multiple email addresses
    By insanity66 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2009, 02:01 PM
  4. edit, save as new and email to multiple email addresses
    By murphyx232 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-20-2007, 02:37 PM
  5. Email Hyperlink to multiple addresses.
    By Dave F. in forum Excel General
    Replies: 1
    Last Post: 05-11-2006, 07:55 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