Search code examples
excelexcel-2013vba

Separating email addresses


I would like to know how to separate email addresses in the following code:

With OutApp.CreateItem(0)
If cel.Value <> "" Then
.To = cel.Value
.CC = cel.Offset(0, 10).Value & cel.Offset(0, 11).Value
.Body = strbody & vbNewLine & vbNewLine & Signature

In the CC field when the macro is run it does populate the fields but like this: CC: [email protected]@mail.com and it should be like this CC: [email protected]; [email protected]

Any ideas on how to solve this? I have already tried: cel.Offset(0, 10).Value & ";" & cel.Offset(0, 11).Value but no luck


Solution

  • This was fixed like this cel.Offset(0, 10).Value & " ; " & cel.Offset(0, 11).Value and its working now