A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - General Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

auto send email weekly or monthly using an appointment?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 25th 06, 03:11 AM posted to microsoft.public.outlook
Mr . .
external usenet poster
 
Posts: 22
Default auto send email weekly or monthly using an appointment?

I'd like to send an email weekly at a certain time. I've been searching
around on the web and found a post with the following text/code.
Can someone expound a bit for me? is the "ThisOutlookSession" the name of a
macro? What about the "public / private"?

Question: How can you get VBA in outlook to send a message on a daily or
weekly basis?

Thanks To andrzej and www.outlookvba.com for this answer!

Set up a folder in your inbox called News Put your email in here
Set a recuring appointment in the calender with the subject new, to recur
when you want the email sent also set a reminder.

in ThisOutlookSession add the following:

Public WithEvents myOlItems As Outlook.Items

Private Sub Application_Reminder(ByVal Item As Object)

'wait for reminder
If Item.Sensitivity olConfidential Then
If TypeOf Item Is AppointmentItem Then SendApptReminder Item
End If

End Sub

Private Sub SendApptReminder(ByRef Item As AppointmentItem)

'Test the Subject of Reminder
If Item.Subject = "news" Then sendpage2 Else

End Sub
'Send news letter

Private Sub sendpage2()

Set ol = New Outlook.Application
Set olns = ol.GetNamespace("MAPI")
Set MyInboxFolder = olns.GetDefaultFolder(olFolderInbox)
Set myNewsletter = MyInboxFolder.Folders("News")
Then
Set mynews = myNewsletter.Items(1)
mynews.send

End Sub


Ads
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I can send email but cannot receive email in Outlook 2003 Stephen Outlook - General Queries 1 February 4th 06 08:59 PM
How do I get my XP Pro Outlook to auto fill email addresses? Rick Outlook - General Queries 1 January 15th 06 03:36 PM
Auto-completed email address and outlook profiles Hoopy Outlook - General Queries 2 January 12th 06 12:48 AM
OL won't auto send/receive LT Outlook - General Queries 3 January 9th 06 12:13 AM
File send send Link by Email problems in IE after Thunderbird Install Woody Outlook - General Queries 0 January 8th 06 12:26 AM


All times are GMT +1. The time now is 04:11 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.