Using a macro in excel 2007, I'm sending an email based on worksheet cell contents. One cell to the "To", and the 2nd cell to the "Cc". The email sends ok, but both id's are on the To line. Below is my code. How can I fix? I'm using code I inherited, not an VBA programmer!
Dim OlApp As Object
Dim OlMail As Object
'Dim ToRecipient As String
'Dim CCRecipient As String
Set OlApp = CreateObject("Outlook.Application")
Set OlMail = OlApp.createitem(olmailitem)
ToRecipient = Worksheets("Observation_email").Range("d4").Text
OlMail.Recipients.Add ToRecipient
CCRecipient = Worksheets("Observation_email").Range("d6").Text
OlMail.Recipients.Add CCRecipient