Hi
This is probably simple but somehow I can't seem to get it to work!!!
I have code which emails a workbook using CDO to an address hard coded in the macro. I now want to add an aditional address to the code. The additional address is entered in a cell of a worksheet before running the macro.
The code at present looks like this:
I now want it to also send to the address contained in "uptime" worksheet cell "G4"![]()
Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "My Server.com" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With Dim MySubject As String MySubject = Range("A331").Value With iMsg Set .Configuration = iConf .To = "hard_coded_emai@address.Com" .CC = "" .BCC = "" .From = """ME"" <Me@Here.com>" .Subject = MySubject .TextBody = "Workbook Attached" .AddAttachment TempFilePath & TempFileName & FileExtStr .Send End With
Thanks Guys!!!!!!!!
Bookmarks