View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
nockam[_3_] nockam[_3_] is offline
external usenet poster
 
Posts: 1
Default Email attachment when someone else has it open


I have windows task scheduler setup to run some VBS code for me to send
out some reports automatically ever night for me. However some people
have started to figure out if they leave the file open the report will
not send. I have looked all over and cannot figure out how to do this.
Can anyone tell me what I need to do in order to make it so that if
someone has the file opened it will still send the attachment?



Set objemail = CreateObject("CDO.Message")
objemail.From = "
objemail.To = "
objemail.cc = "
objemail.Subject = "Subject"
objemail.Textbody = "Body"
objemail.AddAttachment "file path"
objemail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objemail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"mailserver.domain.com"
objemail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =
25
objemail.Configuration.Fields.Update
objemail.Send


--
nockam
------------------------------------------------------------------------
nockam's Profile: http://www.excelforum.com/member.php...o&userid=15744
View this thread: http://www.excelforum.com/showthread...hreadid=504809