Copy range of cells to subject of outlook mail

前端 未结 1 504
无人共我
无人共我 2021-01-16 19:23

The function of this code is to copy particular range of cells, each cell (having codes like 1ML-234-1R) and place it in the body of outlook ma

相关标签:
1条回答
  • 2021-01-16 19:58

    OK then:

    '.....
    .Subject = RangeToCSV(rng)
    '.....
    

    Function:

    Function RangeToCSV(rng)
        Dim s, sep, c As Range
        For Each c In rng.Cells
            If c.Value <> "" Then
                s = s & sep & c.Value
                sep = ","
            End If
        Next c
        RangeToCSV = s
    End Function
    
    0 讨论(0)
提交回复
热议问题