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

resend email from calendar event?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 27th 06, 12:03 AM posted to microsoft.public.outlook
Mr . .
external usenet poster
 
Posts: 22
Default resend email from calendar event?

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
  #2  
Old January 27th 06, 04:18 PM posted to microsoft.public.outlook
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default resend email from calendar event?

The first time you use Alt+F11 to open the Outlook VBA environment, you'll see that it contains a single built-in module, named ThisOutlookSession. You can put all your code there.

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/comm....program_v ba

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Mr . ." wrote in message om...
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





 




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
calendar appointments show up on your delegate's calendar also? [email protected] Outlook - General Queries 0 January 25th 06 06:38 PM
Traping AttachmentRead event on preview pane Outlook 2000 [email protected] Outlook - General Queries 1 January 18th 06 03:07 PM
can I transfer Works calendar to Outlook calendar claybird Outlook - General Queries 1 January 13th 06 07:57 PM
Transfer all calendar items from PST calendar to Inbox calendar Milly Staples [MVP - Outlook] Outlook - General Queries 0 January 7th 06 06:15 PM


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.