Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Email attachment when someone else has it open

If you can control the file ?
If the file is open use SaveCopyAs to save a copy and send that one

--
Regards Ron de Bruin
http://www.rondebruin.nl


"nockam" wrote in message
...

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Email attachment when someone else has it open

Can you try giving it a different file name

That way it shouldn't intefere

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200601/1
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
can't open Excel file sent as email attachment, direct from OE Siswojo Soedjito Excel Discussion (Misc queries) 5 July 15th 08 01:11 PM
send wkbk as an email attachment with an email address copied from SueInAtl Excel Discussion (Misc queries) 0 May 21st 07 10:53 PM
How do I down load excel to open email attachment? confused Excel Discussion (Misc queries) 2 February 24th 06 05:40 AM
Excel Spreadsheet email attachment unable to open in Outlook Expr. Joanne from Tiffin, Oh Excel Discussion (Misc queries) 1 April 23rd 05 12:21 AM
how do you open an email attachment that is an excel speadsheet w. arrow bb Excel Discussion (Misc queries) 1 March 3rd 05 02:53 PM


All times are GMT +1. The time now is 01:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"