Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Email attachment when someone else has it open

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nockam - 25 Jan 2006 08:46 GMT
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 = "address@domain.com"
objemail.To = "address@domain.com"
objemail.cc = "address@domain.com"
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

Signature

nockam

Ron de Bruin - 25 Jan 2006 14:35 GMT
If you can control the file ?
If the file is open use SaveCopyAs to save a copy and send that one

Signature

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

> 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
[quoted text clipped - 20 lines]
> objemail.Configuration.Fields.Update
> objemail.Send
Crowbar - 25 Jan 2006 14:36 GMT
Can you try giving it a different file name

That way it shouldn't intefere
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.