+ Reply to Thread
Results 1 to 3 of 3

Email attachment when someone else has it open

  1. #1
    Registered User
    Join Date
    10-26-2004
    Posts
    22

    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 = "[email protected]"
    objemail.To = "[email protected]"
    objemail.cc = "[email protected]"
    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

  2. #2
    Ron de Bruin
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    >
    > 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 = "[email protected]"
    > objemail.To = "[email protected]"
    > objemail.cc = "[email protected]"
    > 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. #3
    Crowbar via OfficeKB.com
    Guest

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1