[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Send an automatic scheduled email with an attachment on a weekly basis

Posted on 2005-04-18
12
Medium Priority
?
424 Views
Last Modified: 2012-05-05
We have an excel document that needs to be sent via email automatically once a week. We have Windows Server 2003, Outlook 2003 and Exchange 2003. We don't want to install and third-party software or any new add-ins for Outlook. Can someone tell me how we can accomplish this?
0
Comment
Question by:GMJ29
  • 7
  • 3
  • 2
12 Comments
 
LVL 21

Assisted Solution

by:traval
traval earned 1000 total points
ID: 13806980
As far as I am aware, MS hasn't posted the Outlook 2003 version of this article, but the solution detailed here should work in your environment just fine:
OL2002: How to Create a Solution That Runs at a Specific Time Interval (290654)
http://support.microsoft.com/default.aspx?scid=KB;EN-US;290654
0
 

Author Comment

by:GMJ29
ID: 13807310
Thank you, but we do not have Access
0
 
LVL 21

Expert Comment

by:traval
ID: 13807874
As Access is not required for this solution, that should not be a problem.  The only reference to Access in the article mentions that code which allows you to automatically send an email is available in an article about Access, and you can use that code along with the other steps in the article I referenced to automatically send a message at a predefined time.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 76

Accepted Solution

by:
David Lee earned 1000 total points
ID: 13808270
Hi GMJ29,
> We don't want to install and third-party software or any new add-ins for Outlook

Does that include an Outlook macro?  If not, then I can help you out.

Cheers!
0
 

Author Comment

by:GMJ29
ID: 13815234
traval - I'm not sure what to do with the code. I put it into an asp page, but am getting a whole slew of errors. Can you explain in a little more detail what needs to be done?

BlueDevilFan - what can we do as far as macros are concerned?
0
 

Author Comment

by:GMJ29
ID: 13815430
ok guys, i got the code into an Outlook Macro and it works if I run it from the VB editor. How do I make this schedule to run weekly?
0
 

Author Comment

by:GMJ29
ID: 13824531
I'm looking at the knowledge base article that traval posted and see that you can automate the vb script using cdo - I have no idea how to do this. Can someone please give me a little more input on how to automate this? Any further help on this is greatly appreciated
0
 
LVL 76

Expert Comment

by:David Lee
ID: 13829224
GMJ29,

In answer to your question about what can we do with macros, the answer is "most anything".  I don't use CDO much so I can't help with that.  I can create a simple macro that will do this though if that's an alternative.
0
 

Author Comment

by:GMJ29
ID: 13833120
well, i developed a macro that sends the mail with the attachment, but i don't know how to schedule it to run at a predetermined time
0
 
LVL 76

Expert Comment

by:David Lee
ID: 13839772
Take a look at this question:  http://www.experts-exchange.com/Applications/MS_Office/Outlook/Q_21286755.html  In it I used an Outlook Task Reminder to trigger a process.
0
 

Author Comment

by:GMJ29
ID: 13895562
Here it is - I somehow got it to work. The usage after the code is compiled is:
xxx.exe [sender address] [recipient address] [subject] [body] [attachment path]

Imports System.Web.Mail

Module Module1

    Public Sub Main(ByVal args As String())

        Dim oMsg As MailMessage = New MailMessage

        ' TODO: Replace with sender e-mail address.
        oMsg.From = args(0)
        ' TODO: Replace with recipient e-mail address.
        oMsg.To = args(1)
        oMsg.Subject = args(2)

        ' SEND IN HTML FORMAT (comment this line to send plain text).
        oMsg.Body = args(3)


        'HTML Body (remove HTML tags for plain text).
        'oMsg.Body = "<HTML><BODY><B>Hello World!</B></BODY></HTML>"

        ' ADD AN ATTACHMENT.
        ' TODO: Replace with path to attachment.
        Dim sFile As String = args(4)
        Dim oAttch As MailAttachment = New MailAttachment(sFile, MailEncoding.Base64)


        'oMsg.Attachments.Add(oAttch)

        ' TODO: Replace with the name of your remote SMTP server.
        SmtpMail.SmtpServer = "xxx"
        SmtpMail.Send(oMsg)

        oMsg = Nothing
        'oAttch = Nothing
    End Sub

End Module
0
 

Author Comment

by:GMJ29
ID: 13895566
You all gave me some good help - here's the points
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
I came across an unsolved Outlook issue and here is my solution.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question